ChatRoomEventHandler class
~english The chat room event handler.
Adds chat event handler:
ChatClient.getInstance.chatRoomManager.addEventHandler(UNIQUE_HANDLER_ID, ChatRoomEventHandler());
Removes a chat room event handler:
ChatClient.getInstance.chatRoomManager.removeEventHandler(UNIQUE_HANDLER_ID);
~end
~chinese 聊天室事件监听。
添加监听:
ChatClient.getInstance.chatRoomManager.addEventHandler(UNIQUE_HANDLER_ID, ChatRoomEventHandler());
Removes a chat room event handler:
ChatClient.getInstance.chatRoomManager.removeEventHandler(UNIQUE_HANDLER_ID);
~end
Constructors
-
ChatRoomEventHandler({void onAdminAddedFromChatRoom(String roomId, String admin)?, void onAdminRemovedFromChatRoom(String roomId, String admin)?, void onAllChatRoomMemberMuteStateChanged(String roomId, bool isAllMuted)?, void onAllowListAddedFromChatRoom(String roomId, List<
String> members)?, void onAllowListRemovedFromChatRoom(String roomId, List<String> members)?, void onAnnouncementChangedFromChatRoom(String roomId, String announcement)?, void onChatRoomDestroyed(String roomId, String? roomName)?, void onMemberExitedFromChatRoom(String roomId, String? roomName, String participant)?, void onMemberJoinedFromChatRoom(String roomId, String participant)?, void onMuteListAddedFromChatRoom(String roomId, List<String> mutes, String? expireTime)?, void onMuteListRemovedFromChatRoom(String roomId, List<String> mutes)?, void onOwnerChangedFromChatRoom(String roomId, String newOwner, String oldOwner)?, void onRemovedFromChatRoom(String roomId, String? roomName, String? participant, LeaveReason? reason)?, void onSpecificationChanged(ChatRoom room)?, void onAttributesUpdated(String roomId, Map<String, String> attributes, String from)?, void onAttributesRemoved(String roomId, List<String> removedKeys, String from)?}) - ~english The chat room manager listener callback.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onAdminAddedFromChatRoom → (void Function(String roomId, String admin)?)
-
~english
Occurs when a member is changed to be an admin.
~end
final
- onAdminRemovedFromChatRoom → (void Function(String roomId, String admin)?)
-
~english
Occurs when an admin is removed.
~end
final
- onAllChatRoomMemberMuteStateChanged → (void Function(String roomId, bool isAllMuted)?)
-
~english
Occurs when all members in the chat room are muted or unmuted.
~end
final
-
onAllowListAddedFromChatRoom
→ (void Function(String roomId, List<
String> members)?) -
~english
Occurs when the chat room member(s) is/are added to the allowlist.
~end
final
-
onAllowListRemovedFromChatRoom
→ (void Function(String roomId, List<
String> members)?) -
~english
Occurs when the chat room member(s) is/are removed from the allowlist.
~end
final
- onAnnouncementChangedFromChatRoom → (void Function(String roomId, String announcement)?)
-
~english
Occurs when the announcement changed.
~end
final
-
onAttributesRemoved
→ (void Function(String roomId, List<
String> removedKeys, String from)?) -
~english
Occurs when the custom chat room attributes (key-value) are removed.
~end
final
-
onAttributesUpdated
→ (void Function(String roomId, Map<
String, String> attributes, String from)?) -
~english
Occurs when the custom chat room attributes (key-value) are updated.
~end
final
- onChatRoomDestroyed → (void Function(String roomId, String? roomName)?)
-
~english
Occurs when the chat room is destroyed.
~end
final
- onMemberExitedFromChatRoom → (void Function(String roomId, String? roomName, String participant)?)
-
~english
Occurs when a member leaves the chat room.
~end
final
- onMemberJoinedFromChatRoom → (void Function(String roomId, String participant)?)
-
~english
Occurs when a user joins the chat room.
~end
final
-
onMuteListAddedFromChatRoom
→ (void Function(String roomId, List<
String> mutes, String? expireTime)?) -
~english
Occurs when a chat room member(s) is/are added to mute list.
~end
final
-
onMuteListRemovedFromChatRoom
→ (void Function(String roomId, List<
String> mutes)?) -
~english
Occurs when the a chat room member(s) is/are removed from mute list.
~end
final
- onOwnerChangedFromChatRoom → (void Function(String roomId, String newOwner, String oldOwner)?)
-
~english
Occurs when the chat room ownership is transferred.
~end
final
- onRemovedFromChatRoom → (void Function(String roomId, String? roomName, String? participant, LeaveReason? reason)?)
-
~english
Occurs when a user is removed from a chat room.
~end
final
- onSpecificationChanged → (void Function(ChatRoom room)?)
-
~english
Occurs when the chat room specifications changes. All chat room members receive this event.
~end
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited