setContactRemark method

Future<void> setContactRemark({
  1. required String userId,
  2. required String remark,
})

~english Set the contact's remark.

Throws A description of the exception. See EMError. ~end

~chinese 设置联系人备注。

Throws 如果有方法调用的异常会在这里抛出,可以看到具体错误原因。请参见 EMError。 ~end

Implementation

Future<void> setContactRemark({
  required String userId,
  required String remark,
}) async {
  Map req = {'userId': userId, "remark": remark};
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.setContactRemark, req);
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}