EMChatRoomEventHandler constructor

EMChatRoomEventHandler(
  1. {void onAdminAddedFromChatRoom(
    1. String roomId,
    2. String admin
    )?,
  2. void onAdminRemovedFromChatRoom(
    1. String roomId,
    2. String admin
    )?,
  3. void onAllChatRoomMemberMuteStateChanged(
    1. String roomId,
    2. bool isAllMuted
    )?,
  4. void onAllowListAddedFromChatRoom(
    1. String roomId,
    2. List<String> members
    )?,
  5. void onAllowListRemovedFromChatRoom(
    1. String roomId,
    2. List<String> members
    )?,
  6. void onAnnouncementChangedFromChatRoom(
    1. String roomId,
    2. String announcement
    )?,
  7. void onChatRoomDestroyed(
    1. String roomId,
    2. String? roomName
    )?,
  8. void onMemberExitedFromChatRoom(
    1. String roomId,
    2. String? roomName,
    3. String participant
    )?,
  9. void onMemberJoinedFromChatRoom(
    1. String roomId,
    2. String participant
    )?,
  10. void onMuteListAddedFromChatRoom(
    1. String roomId,
    2. List<String> mutes,
    3. String? expireTime
    )?,
  11. void onMuteListRemovedFromChatRoom(
    1. String roomId,
    2. List<String> mutes
    )?,
  12. void onOwnerChangedFromChatRoom(
    1. String roomId,
    2. String newOwner,
    3. String oldOwner
    )?,
  13. void onRemovedFromChatRoom(
    1. String roomId,
    2. String? roomName,
    3. String? participant,
    4. LeaveReason? reason
    )?,
  14. void onSpecificationChanged(
    1. EMChatRoom room
    )?,
  15. void onAttributesUpdated(
    1. String roomId,
    2. Map<String, String> attributes,
    3. String from
    )?,
  16. void onAttributesRemoved(
    1. String roomId,
    2. List<String> removedKeys,
    3. String from
    )?}
)

聊天室事件监听。

Param onAdminAddedFromChatRoom 有成员设置为聊天室管理员的回调。

Param onAdminRemovedFromChatRoom 移除聊天室管理员权限的回调。

Param onAllChatRoomMemberMuteStateChanged 聊天室全员禁言状态变化回调。

Param onAllowListAddedFromChatRoom 有成员被加入聊天室白名单的回调。

Param onAllowListRemovedFromChatRoom 有成员被移出聊天室白名单的回调。

Param onAnnouncementChangedFromChatRoom 聊天室公告更新回调。

Param onChatRoomDestroyed 聊天室解散的回调。

Param onMemberExitedFromChatRoom 聊天室成员主动退出回调。

Param onMemberJoinedFromChatRoom 聊天室加入新成员回调。

Param onMuteListAddedFromChatRoom 有成员被禁言回调。

Param onMuteListRemovedFromChatRoom 有成员从禁言列表中移除回调。

Param onOwnerChangedFromChatRoom 转移聊天室的所有权的回调。

Param onRemovedFromChatRoom 聊天室成员被移出聊天室回调。

Param onSpecificationChanged 聊天室详情变更。

Param onAttributesUpdated 聊天室属性变更。

Param onAttributesRemoved 聊天室属性被删除。

Implementation

EMChatRoomEventHandler({
  this.onAdminAddedFromChatRoom,
  this.onAdminRemovedFromChatRoom,
  this.onAllChatRoomMemberMuteStateChanged,
  this.onAllowListAddedFromChatRoom,
  this.onAllowListRemovedFromChatRoom,
  this.onAnnouncementChangedFromChatRoom,
  this.onChatRoomDestroyed,
  this.onMemberExitedFromChatRoom,
  this.onMemberJoinedFromChatRoom,
  this.onMuteListAddedFromChatRoom,
  this.onMuteListRemovedFromChatRoom,
  this.onOwnerChangedFromChatRoom,
  this.onRemovedFromChatRoom,
  this.onSpecificationChanged,
  this.onAttributesUpdated,
  this.onAttributesRemoved,
});