stopForegroundService method Null safety

Future<void> stopForegroundService()

Stops a foreground service.

If the foreground service was not started, this function does nothing.

It is sufficient to call this method once to stop the foreground service, even if startForegroundService was called multiple times.

Implementation

Future<void> stopForegroundService() =>
    _channel.invokeMethod('stopForegroundService');