stopOnStationary property
Automatically BackgroundGeolocation.stop when the stopTimeout elapses.
The plugin can optionally automatically stop tracking when the stopTimeout timer elapses. For example, when the plugin first fires BackgroundGeolocation.onMotionChange into the moving state, the next time an onMotionChange event occurs into the stationary state, the plugin will have automatically called BackgroundGeolocation.stop upon itself.
WARNING: stopOnStationary
will only occur due to stopTimeout timer elapse. It will not occur by manually executing BackgroundGeolocation.changePace:false.
BackgroundGeolocation.ready(Config(
stopOnStationary: true,
isMoving: true
)).then((State state) {
BackgroundGeolocation.start();
});
Implementation
bool? stopOnStationary;