handleMethodCall method
Handles a call coming from the platform side of the background channel.
Implementation
@visibleForTesting
Future<void> handleMethodCall(MethodCall call) async {
if (call.method != BackgroundChannel.onRegionEvent) {
return;
}
try {
await _dispatchRegionEvent(call.arguments as List<dynamic>);
} catch (error) {
debugPrint('Woosmap background callback failed: $error');
}
await _channel.invokeMethod<void>(BackgroundChannel.eventProcessed);
}