start static method

void start({
  1. String? notificationChannelId,
  2. String? notificationChannelName,
  3. String? notificationContentTitle,
  4. String? notificationContentText,
})

Start foreground service. Only works on Android.

Implementation

static void start({
  String? notificationChannelId,
  String? notificationChannelName,
  String? notificationContentTitle,
  String? notificationContentText
}) async {
  if (Platform.isAndroid)
    _mChannel.invokeMethod('startForegroundService', {
      'notificationChannelId': notificationChannelId,
      'notificationChannelName': notificationChannelName,
      'notificationContentTitle': notificationContentTitle,
      'notificationContentText': notificationContentText
    });
}