setLocalCustomData method

  1. @override
Future<V2TimCallback> setLocalCustomData({
  1. required String msgID,
  2. required String localCustomData,
})
override

设置消息自定义数据(本地保存,不会发送到对端,程序卸载重装后失效)

注意: web不支持该接口

Implementation

@override
Future<V2TimCallback> setLocalCustomData({
  required String msgID,
  required String localCustomData,
}) async {
  Map<String, dynamic> param = {
    "localCustomData": localCustomData,
    "msgID": msgID,
  };
  var resp = V2TimCallback.fromJson(
    formatJson(
      await _channel.invokeMethod(
        "setLocalCustomData",
        buildMessageMangerParam(
          param,
        ),
      ),
    ),
  );
  log("setLocalCustomData", param, resp.toLogString());
  return resp;
}