removeMemberAttributes method
~english Removes custom attributes of a group member.
Param groupId
The group ID.
Param keys
The keys of custom attributes to remove.
Param userId
The user ID of the group member for whom the custom attributes are removed. The default value is the current user ID.
Throws A description of the exception. See ChatError. ~end
~chinese 设置群成员自定义属性。
Param groupId
群组 ID。
Param keys
要删除群成员自定义属性对应的 key。
Param userId
要设置自定义属性的群成员的用户 ID,默认为当前用户 ID。
Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 ChatError。 ~end
Implementation
Future<void> removeMemberAttributes({
required String groupId,
required List<String> keys,
String? userId,
}) async {
Map req = {
'groupId': groupId,
};
if (userId != null) {
req.putIfNotNull('userId', userId);
}
req.putIfNotNull('keys', keys);
Map result = await _channel.invokeMethod(
ChatMethodKeys.removeMemberAttributesFromGroup, req);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}