newObject method

dynamic newObject(
  1. String clazz,
  2. List? arguments
)

Implementation

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