updateBackgroundService method

  1. @override
Future<bool> updateBackgroundService({
  1. required NotificationPayload payload,
  2. required ServiceType type,
})
override

Implementation

@override
Future<bool> updateBackgroundService({
  required NotificationPayload payload,
  required ServiceType type,
}) async {
  if (await isBackgroundServiceRunning(type) == true) {
    return await methodChannel.invokeMethod(
      'updateBackgroundService',
      {
        ...payload.toJson(),
        'type': type.name,
      },
    );
  }
  return false;
}