sendInvokeStaticMethod method

Future<Object?> sendInvokeStaticMethod(
  1. String channelName,
  2. String methodName,
  3. List<Object?> arguments
)

Invoke static method methodName on type channel of channelName.

Also sends a message to another TypeChannelMessenger to invoke a static method on the TypeChannelHandler registered to TypeChannel with name: name. See TypeChannelMessenger.registerHandler.

Implementation

Future<Object?> sendInvokeStaticMethod(
  String channelName,
  String methodName,
  List<Object?> arguments,
) async {
  final Object? result = await messageDispatcher.sendInvokeStaticMethod(
    channelName,
    methodName,
    converter.convertInstances(instanceManager, arguments)! as List<Object?>,
  );

  return converter.convertPairedInstances(instanceManager, result);
}