muteMembers method
Mutes group members.
Only the group owner or admin can call this method.
Param groupId
The group ID.
Param members
The list of members to be muted.
Param duration
The mute duration in milliseconds.
Throws A description of the exception. See ChatError.
Implementation
Future<void> muteMembers(
String groupId,
List<String> members, {
int duration = -1,
}) async {
Map req = {'groupId': groupId, 'members': members, 'duration': duration};
Map result = await _channel.invokeMethod(ChatMethodKeys.muteMembers, req);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}