muteChatRoomMembers method Null safety
Mutes the specified members in a chat room.
Only the chat room owner or admin can call this method.
Param roomId
The chat room ID.
Param muteMembers
The list of members to be muted.
Param duration
The mute duration in milliseconds.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<void> muteChatRoomMembers(
String roomId,
List<String> muteMembers, {
int duration = -1,
}) async {
Map req = {
"roomId": roomId,
"muteMembers": muteMembers,
"duration": duration
};
Map result =
await _channel.invokeMethod(ChatMethodKeys.muteChatRoomMembers, req);
try {
EMError.hasErrorFromResult(result);
} on EMError catch (e) {
throw e;
}
}