backgroundEntrypoint function
Implementation
@pragma('vm:entry-point')
Future<void> backgroundEntrypoint(List<String> args) async {
WidgetsFlutterBinding.ensureInitialized();
final service = IOSServiceInstance._();
final int handle = int.parse(args.first);
final callbackHandle = CallbackHandle.fromRawHandle(handle);
final onStart = PluginUtilities.getCallbackFromHandle(callbackHandle)
as FutureOr<bool> Function(ServiceInstance instance)?;
if (onStart != null) {
final result = await onStart(service);
await service._setBackgroundFetchResult(result);
}
}