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