leaveChatRoom method
- String roomId
~english Leaves the chat room.
Param roomId The ID of the chat room to leave.
Throws A description of the exception. See EMError. ~end
~chinese 离开聊天室。
Param roomId 聊天室 ID。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError。 ~end
Implementation
Future<void> leaveChatRoom(String roomId) async {
try {
Map result = await Client.instance.chatRoomManager
.callNativeMethod(ChatMethodKeys.leaveChatRoom, {"roomId": roomId});
EMError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}