callMethod method

dynamic callMethod(
  1. dynamic method,
  2. List arguments,
  3. String objectRef
)

Implementation

dynamic callMethod(
    dynamic method, List<dynamic> arguments, String objectRef) {
  if (!kIsMPFlutterDevmode) {
    throw "未开启 MPFlutter Debugger 标志,MPJS 调用失败。";
  }
  final result = IsolateDevServer.shared.invokeMethod(
    _MPJSMethodList.callMethod,
    {
      "method": method,
      "arguments": arguments,
      "objectRef": objectRef,
    },
  );
  return result;
}