setupAccessibilityEventChannel method

  1. @override
Future<Map<String, dynamic>> setupAccessibilityEventChannel()
override

Configures the event channel for the accessibility service

Implementation

@override
Future<Map<String, dynamic>> setupAccessibilityEventChannel() async {
  try {
    final result = await methodChannel.invokeMethod<Map<Object?, Object?>>(
      'setupAccessibilityEventChannel',
    );
    return Map<String, dynamic>.from(result ?? {});
  } on PlatformException catch (e) {
    debugPrint('Error setting up accessibility event channel: ${e.message}');
    return {'success': false, 'error': e.message};
  }
}