blockMembers method
Adds the user to the block list of the group.
Users will be first removed from the group they have joined before being added to the block list of the group. The users on the group block list cannot join the group again.
Only the group owner or admin can call this method.
Param groupId
The group ID.
Param members
The list of users to be added to the block list.
Throws A description of the exception. See ChatError.
Implementation
Future<void> blockMembers(
String groupId,
List<String> members,
) async {
Map req = {'groupId': groupId, 'members': members};
Map result = await _channel.invokeMethod(ChatMethodKeys.blockMembers, req);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}