stopBackgroundTask static method
Signal completion of startBackgroundTask
Sends a signal to the native OS that your long-running task, addressed by taskId
provided by startBackgroundTask is complete and the OS may proceed to suspend your application if applicable.
Implementation
static Future<int> stopBackgroundTask(int taskId) async {
return (await _methodChannel.invokeMethod<int>('finish', taskId))
as FutureOr<int>;
}