callbackDispatcherLegacy function
void
callbackDispatcherLegacy()
Background isolate entry point for the deprecated NetmeraPushBroadcastReceiver.
Implementation
@pragma('vm:entry-point')
void callbackDispatcherLegacy() {
WidgetsFlutterBinding.ensureInitialized();
const MethodChannel backgroundChannel =
MethodChannel('flutter_nm_sdk_background');
backgroundChannel.setMethodCallHandler((MethodCall call) async {
final List<dynamic> args = call.arguments;
final Function callback = PluginUtilities.getCallbackFromHandle(
CallbackHandle.fromRawHandle(args[0]))!;
Map<dynamic, dynamic> bundle = args[1];
callback(bundle);
});
backgroundChannel.invokeMethod('serviceInitialized');
}