stopOnStationary property

bool? stopOnStationary
final

Automatically BackgroundGeolocation.stop when the GeoConfig.stopTimeout elapses.

The plugin can optionally automatically stop tracking when the GeoConfig.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 GeoConfig.stopTimeout timer elapse. It will not occur by manually executing BackgroundGeolocation.changePace:false.

BackgroundGeolocation.ready(Config(
  activity: ActivityConfig(
    stopOnStationary: true,
  ),
  isMoving: true,
)).then((State state) {
  BackgroundGeolocation.start();
});

Implementation

final bool? stopOnStationary;