setCallbackOnAccessibilityEvent static method
Implementation
static Future<void> setCallbackOnAccessibilityEvent(
void Function(AccessibilityEvent event) callback) async {
CallbackHandle? userCallbackHandle =
PluginUtilities.getCallbackHandle(callback);
stderr.writeln(callback);
if (userCallbackHandle == null) {
throw AssertionError(
"cannot set callback that is not static or top-level");
}
await _channel.invokeMethod(
'registerCallback', userCallbackHandle.toRawHandle());
}