onReceiveInvokeMethod method

Object? onReceiveInvokeMethod(
  1. String channelName,
  2. PairedInstance pairedInstance,
  3. String methodName,
  4. List<Object?> arguments,
)

Invoke a method on pairedInstance for a type channel.

Implementation

Object? onReceiveInvokeMethod(
  String channelName,
  PairedInstance pairedInstance,
  String methodName,
  List<Object?> arguments,
) {
  final Object? result = getChannelHandler(channelName)!.invokeMethod(
    this,
    getPairedObject(pairedInstance)!,
    methodName,
    converter.convertPairedInstances(instanceManager, arguments)!
        as List<Object?>,
  );

  return converter.convertInstances(instanceManager, result);
}