callComponentMethod method

  1. @override
Future callComponentMethod(
  1. String viewId,
  2. String methodName,
  3. Map<String, dynamic> args
)
override

Call a method on a specific component instance

Implementation

@override
Future<dynamic> callComponentMethod(
    String viewId, String methodName, Map<String, dynamic> args) async {
  try {
    return await bridgeChannel.invokeMethod('callComponentMethod', {
      'viewId': viewId,
      'methodName': methodName,
      'args': args,
    });
  } catch (e) {
    debugPrint('Error calling component method $methodName on $viewId: $e');
    return null;
  }
}