stopBackgroundService method

Future<void> stopBackgroundService()

Stops the background step counting service.

This method stops the background service that monitors step data. After calling this method, step counting will only occur when the app is in the foreground (if supported by the platform).

Throws PlatformException if the service cannot be stopped.

Implementation

Future<void> stopBackgroundService() {
  return StepsCountPlatform.instance.stopBackgroundService();
}