deven98 / shake

A flutter package for detecting phone shakes.
BSD 2-Clause "Simplified" License
95 stars 63 forks source link

Is it possible to test shaking the device in a widget/integration test? #14

Open toebgen opened 2 years ago

toebgen commented 2 years ago

Is it possible to mock this in a Flutter Integration Test somehow? I am looking for a way to do this programmatically.

deven98 commented 2 years ago

The package uses sensors_plus underneath, so while I need to do a bit more research, the first place I would start looking is their test folder: https://github.com/fluttercommunity/plus_plugins/blob/main/packages/sensors_plus/sensors_plus/test/sensors_test.dart

Currently pushing a few other changes to the package but I'll look into adding tests and mocking this next week.