EMChatRoomEventHandler class
聊天室事件监听。
添加监听:
EMClient.getInstance.chatRoomManager.addEventHandler(UNIQUE_HANDLER_ID, EMChatRoomEventHandler());
Removes a chat room event handler:
EMClient.getInstance.chatRoomManager.removeEventHandler(UNIQUE_HANDLER_ID);
Constructors
-
EMChatRoomEventHandler({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(EMChatRoom room)?, void onAttributesUpdated(String roomId, Map<String, String> attributes, String from)?, void onAttributesRemoved(String roomId, List<String> removedKeys, String from)?}) - 聊天室事件监听。
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- onAdminAddedFromChatRoom → (void Function(String roomId, String admin)?)
-
有成员设置为聊天室管理员的回调。
final
- onAdminRemovedFromChatRoom → (void Function(String roomId, String admin)?)
-
移除聊天室管理员权限的回调。
final
- onAllChatRoomMemberMuteStateChanged → (void Function(String roomId, bool isAllMuted)?)
-
聊天室全员禁言状态变化回调。
final
-
onAllowListAddedFromChatRoom
→ (void Function(String roomId, List<
String> members)?) -
有成员被加入聊天室白名单的回调。
final
-
onAllowListRemovedFromChatRoom
→ (void Function(String roomId, List<
String> members)?) -
有成员被移出聊天室白名单的回调。
final
- onAnnouncementChangedFromChatRoom → (void Function(String roomId, String announcement)?)
-
聊天室公告更新回调。
final
-
onAttributesRemoved
→ (void Function(String roomId, List<
String> removedKeys, String from)?) -
聊天室属性被删除。
final
-
onAttributesUpdated
→ (void Function(String roomId, Map<
String, String> attributes, String from)?) -
聊天室属性变更。
final
- onChatRoomDestroyed → (void Function(String roomId, String? roomName)?)
-
聊天室解散的回调。
final
- onMemberExitedFromChatRoom → (void Function(String roomId, String? roomName, String participant)?)
-
聊天室成员主动退出回调。
final
- onMemberJoinedFromChatRoom → (void Function(String roomId, String participant)?)
-
聊天室加入新成员回调。
final
-
onMuteListAddedFromChatRoom
→ (void Function(String roomId, List<
String> mutes, String? expireTime)?) -
有成员被禁言回调。
final
-
onMuteListRemovedFromChatRoom
→ (void Function(String roomId, List<
String> mutes)?) -
有成员从禁言列表中移除回调。
final
- onOwnerChangedFromChatRoom → (void Function(String roomId, String newOwner, String oldOwner)?)
-
转移聊天室的所有权的回调。
final
- onRemovedFromChatRoom → (void Function(String roomId, String? roomName, String? participant, LeaveReason? reason)?)
-
当前用户被移出聊天室回调。
final
- onSpecificationChanged → (void Function(EMChatRoom room)?)
-
聊天室详情变更。
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