stop static method

Future<State> stop()

Disable location tracking.

Example

BackgroundGeolocation.stop();

WARNING: If you've configured a Config.schedule, #stop will not halt the Scheduler. You must explicitly stop the Scheduler as well:

// Later when you want to stop the Scheduler (eg: user logout)
BackgroundGeolocation.stopSchedule();

Implementation

static Future<State> stop() async {
  Map state = (await _methodChannel.invokeMapMethod('stop'))!;
  return State(state);
}