setValueOfObject method

dynamic setValueOfObject(
  1. dynamic key,
  2. dynamic value,
  3. String objectRef
)

Implementation

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