stop method

Future<void> stop()

Implementation

Future<void> stop() async {
  final ServiceRequestResult result =
      await FlutterForegroundTask.stopService();

  if (result is ServiceRequestFailure) {
    throw result.error;
  }
}