init static method

void init({
  1. required AndroidNotificationOptions androidNotificationOptions,
  2. required IOSNotificationOptions iosNotificationOptions,
  3. required ForegroundTaskOptions foregroundTaskOptions,
})

Initialize the FlutterForegroundTask.

Implementation

static void init({
  required AndroidNotificationOptions androidNotificationOptions,
  required IOSNotificationOptions iosNotificationOptions,
  required ForegroundTaskOptions foregroundTaskOptions,
}) {
  FlutterForegroundTask.androidNotificationOptions =
      androidNotificationOptions;
  FlutterForegroundTask.iosNotificationOptions = iosNotificationOptions;
  FlutterForegroundTask.foregroundTaskOptions = foregroundTaskOptions;
  FlutterForegroundTask.isInitialized = true;
}