removeMemberAttributes method
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.
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;
}
}