ChatRoomEventHandler class

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);

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)?})
The chat room manager listener callback.

Properties

hashCode int
The hash code for this object.
read-onlyinherited
onAdminAddedFromChatRoom → (void Function(String roomId, String admin)?)
Occurs when a member is changed to be an admin.
final
onAdminRemovedFromChatRoom → (void Function(String roomId, String admin)?)
Occurs when an admin is removed.
final
onAllChatRoomMemberMuteStateChanged → (void Function(String roomId, bool isAllMuted)?)
Occurs when all members in the chat room are muted or unmuted.
final
onAllowListAddedFromChatRoom → (void Function(String roomId, List<String> members)?)
Occurs when the chat room member(s) is/are added to the allowlist.
final
onAllowListRemovedFromChatRoom → (void Function(String roomId, List<String> members)?)
Occurs when the chat room member(s) is/are removed from the allowlist.
final
onAnnouncementChangedFromChatRoom → (void Function(String roomId, String announcement)?)
Occurs when the announcement changed.
final
onAttributesRemoved → (void Function(String roomId, List<String> removedKeys, String from)?)
Occurs when the custom chat room attributes (key-value) are removed.
final
onAttributesUpdated → (void Function(String roomId, Map<String, String> attributes, String from)?)
Occurs when the custom chat room attributes (key-value) are updated.
final
onChatRoomDestroyed → (void Function(String roomId, String? roomName)?)
Occurs when the chat room is destroyed.
final
onMemberExitedFromChatRoom → (void Function(String roomId, String? roomName, String participant)?)
Occurs when a member leaves the chat room.
final
onMemberJoinedFromChatRoom → (void Function(String roomId, String participant)?)
Occurs when a user joins the chat room.
final
onMuteListAddedFromChatRoom → (void Function(String roomId, List<String> mutes, String? expireTime)?)
Occurs when a chat room member(s) is/are added to mute list.
final
onMuteListRemovedFromChatRoom → (void Function(String roomId, List<String> mutes)?)
Occurs when the a chat room member(s) is/are removed from mute list.
final
onOwnerChangedFromChatRoom → (void Function(String roomId, String newOwner, String oldOwner)?)
Occurs when the chat room ownership is transferred.
final
onRemovedFromChatRoom → (void Function(String roomId, String? roomName, String? participant, LeaveReason? reason)?)
Occurs when a user is removed from a chat room.
final
onSpecificationChanged → (void Function(ChatRoom room)?)
Occurs when the chat room specifications changes. All chat room members receive this event.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

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