setupCallbacks static method
void
setupCallbacks()
Sets up callbacks for method channel events. Installs the shared callback handler used by the native plugin to send asynchronous events back to Dart.
Implementation
static void setupCallbacks() {
try {
_callbacksMethodChannel.setMethodCallHandler((MethodCall event) async {
_callbacks[event.method]?.call(event.arguments);
});
} catch (e) {
// During testing, the binding might not be initialized yet
if (kDebugMode) {
log('Warning: Could not set method call handler: $e');
}
}
}