setFriendRemark method

Future<void> setFriendRemark({
  1. required String userID,
  2. required String remark,
  3. String? operationID,
})

修改好友备注,为空时会删除备注

userID 好友的userID

remark 好友的备注

Implementation

Future<void> setFriendRemark({
  required String userID,
  required String remark,
  String? operationID,
}) async {
  ReceivePort receivePort = ReceivePort();
  OpenIMManager._sendPort.send(_PortModel(
    method: _PortMethod.setFriendRemark,
    data: {
      'operationID': IMUtils.checkOperationID(operationID),
      'userID': userID,
      'remark': remark,
    },
    sendPort: receivePort.sendPort,
  ));
  _PortResult result = await receivePort.first;

  receivePort.close();
  if (result.error != null) {
    throw OpenIMError(result.errCode!, result.error!, methodName: result.callMethodName);
  }
}