setBackgroundHandler method
setBackgroundHandler
provides a function of location information.
Implementation
Future<void> setBackgroundHandler(BackgroundHandler handler) async {
final callbackDispatcherHandle =
PluginUtilities.getCallbackHandle(callbackDispatcher);
final callbackHandler = PluginUtilities.getCallbackHandle(handler);
if (callbackDispatcherHandle != null && callbackHandler != null) {
await _methodChannel.invokeMethod<bool>(
'set_background_handler',
{
'callbackDispatcherRawHandle': callbackDispatcherHandle.toRawHandle(),
'callbackHandlerRawHandle': callbackHandler.toRawHandle(),
},
);
}
}