send<R> method

Future<R?> send<R>(
  1. String action, {
  2. dynamic arguments,
})

向native端发送并接收future回调 action 此次通信的标识符 arguments 此次通信数据 isBindCall 是否绑定回调设置

Implementation

Future<R?> send<R>(String action, {arguments}) {
  if (action.isEmptyString) {
    return Future.value();
  }
  var future = _methodChannel?.invokeMethod<R>(action, arguments);
  if (future == null) {
    return Future.value();
  }
  return future;
}