EMChatRoomManager class Null safety

The chat room manager class, which manages user joining and exiting the chat room, retrieving the chat room list, and managing member privileges. The sample code for joining a chat room:

    try {
        await EMClient.getInstance.chatRoomManager.joinChatRoom(chatRoomId);
    } on EMError catch (e) {
        debugPrint(e.toString());
    }

Properties

hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addChatRoomAdmin(String roomId, String admin) Future<void>
Adds a chat room admin.
addChatRoomChangeListener(EMChatRoomEventListener listener) → void
Registers a chat room event listener. After registering the chat room event listener, you can listen for events in {@link EMChatRoomEventListener}, for example, users joining and exiting the chat room, adding the specified member to the chat group mute list, updating the chat room allow list, and destroying the chat room.
@Deprecated("Switch to using addChatRoomManagerListener instead.")
addChatRoomManagerListener(EMChatRoomManagerListener listener) → void
Registers a chat room manager listener.
addMembersToChatRoomAllowList(String roomId, List<String> members) Future<void>
Adds members to the allowlist.
addMembersToChatRoomWhiteList(String roomId, List<String> members) Future<void>
Adds members to the allowlist.
@Deprecated("Switch to using EMChatManager#addMembersToChatRoomAllowList instead.")
blockChatRoomMembers(String roomId, List members) Future<void>
Adds the specified members to the block list of the chat room.
changeChatRoomDescription(String roomId, String description) Future<void>
Modifies the chat room description.
changeChatRoomName(String roomId, String name) Future<void>
Changes the chat room name.
changeChatRoomSubject(String roomId, String subject) Future<void>
Changes the chat room subject.
@Deprecated("Switch to using EMChatManager#changeChatRoomName instead.")
changeOwner(String roomId, String newOwner) Future<void>
Transfers the chat room ownership.
clearAllChatRoomManagerListeners() → void
Removes all chat room manager listener.
createChatRoom(String name, {String? desc, String? welcomeMsg, int maxUserCount = 300, List<String>? members}) Future<EMChatRoom>
Creates a chat room.
destroyChatRoom(String roomId) Future<void>
Destroys a chat room.
fetchChatRoomAllowListFromServer(String roomId) Future<List<String>>
Gets the allow list from the server.
fetchChatRoomAnnouncement(String roomId) Future<String?>
Gets the chat room announcement from the server.
fetchChatRoomBlockList(String roomId, {int pageNum = 1, int pageSize = 200}) Future<List<String>>
Gets the chat room block list with pagination.
fetchChatRoomInfoFromServer(String roomId, {bool fetchMembers = false}) Future<EMChatRoom>
Gets the details of the chat room from the server. By default, the details do not include the chat room member list.
fetchChatRoomMembers(String roomId, {String? cursor, int pageSize = 200}) Future<EMCursorResult<String>>
Gets the chat room member list.
fetchChatRoomMuteList(String roomId, {int pageNum = 1, int pageSize = 200}) Future<List<String>>
Gets the list of members who are muted in the chat room from the server.
fetchChatRoomWhiteListFromServer(String roomId) Future<List<String>>
Gets the allow list from the server.
@Deprecated("Switch to using EMChatManager#fetchChatRoomAllowListFromServer instead.")
fetchPublicChatRoomsFromServer({int pageNum = 1, int pageSize = 200}) Future<EMPageResult<EMChatRoom>>
Gets chat room data from the server with pagination.
getAllChatRooms() Future<List<EMChatRoom>>
Gets the list of chat rooms in the cache.
getChatRoomWithId(String roomId) Future<EMChatRoom?>
Gets the chat room in the cache.
isMemberInChatRoomAllowList(String roomId) Future<bool>
Checks whether the member is on the allow list.
isMemberInChatRoomWhiteList(String roomId) Future<bool>
Checks whether the member is on the allow list.
@Deprecated("Switch to using EMChatManager#isMemberInChatRoomAllowList instead.")
joinChatRoom(String roomId) Future<void>
Joins the chat room.
leaveChatRoom(String roomId) Future<void>
Leaves the chat room.
muteAllChatRoomMembers(String roomId) Future<void>
Mutes all members.
muteChatRoomMembers(String roomId, List<String> muteMembers, {int duration = -1}) Future<void>
Mutes the specified members in a chat room.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
removeChatRoomAdmin(String roomId, String admin) Future<void>
Removes privileges of a chat room admin.
removeChatRoomListener(EMChatRoomEventListener listener) → void
Removes a chat room event listener.
@Deprecated("Switch to using removeChatRoomManagerListener instead.")
removeChatRoomManagerListener(EMChatRoomManagerListener listener) → void
Removes a chat room manager listener. This method removes the chat room manager listener registered with {@link #addChatRoomManagerListener(EMChatRoomManagerListener)}.
removeChatRoomMembers(String roomId, List<String> members) Future<void>
Removes the specified members from a chat room.
removeMembersFromChatRoomAllowList(String roomId, List<String> members) Future<void>
Removes members from the allow list.
removeMembersFromChatRoomWhiteList(String roomId, List<String> members) Future<void>
Removes members from the allow list.
@Deprecated("Switch to using EMChatManager#removeMembersFromChatRoomAllowList instead.")
toString() String
A string representation of this object.
inherited
unBlockChatRoomMembers(String roomId, List members) Future<void>
Removes the specified members from the block list of the chat room.
unMuteAllChatRoomMembers(String roomId) Future<void>
Unmutes all members.
unMuteChatRoomMembers(String roomId, List<String> unMuteMembers) Future<void>
Unmutes the specified members in a chat room.
updateChatRoomAnnouncement(String roomId, String announcement) Future<void>
Updates the chat room announcement.

Operators

operator ==(Object other) bool
The equality operator.
inherited