ChatEventHandler constructor

ChatEventHandler(
  1. {void onMessagesReceived(
    1. List<ChatMessage> messages
    )?,
  2. void onCmdMessagesReceived(
    1. List<ChatMessage> messages
    )?,
  3. void onMessagesRead(
    1. List<ChatMessage> messages
    )?,
  4. void onGroupMessageRead(
    1. List<ChatGroupMessageAck> groupMessageAcks
    )?,
  5. VoidCallback? onReadAckForGroupMessageUpdated,
  6. void onMessagesDelivered(
    1. List<ChatMessage> messages
    )?,
  7. void onMessagesRecalled(
    1. List<ChatMessage> messages
    )?,
  8. VoidCallback? onConversationsUpdate,
  9. void onConversationRead(
    1. String from,
    2. String to
    )?,
  10. void onMessageReactionDidChange(
    1. List<ChatMessageReactionEvent> events
    )?,
  11. void onMessageContentChanged(
    1. ChatMessage message,
    2. String operatorId,
    3. int operationTime
    )?}
)

The chat event handler.

Param onMessagesReceived Occurs when a message is received.

Param onCmdMessagesReceived Occurs when a command message is received.

Param onMessagesRead Occurs when a read receipt is received for a one-to-one message.

Param onGroupMessageRead Occurs when a read receipt is received for a group message.

Param onReadAckForGroupMessageUpdated Occurs when the group message read status is received.

Param onMessagesDelivered Occurs when a delivery receipt is received.

Param onMessagesRecalled Occurs when a received message is recalled.

Param onConversationsUpdate Occurs when a conversation is updated.

Param onConversationRead Occurs when a conversation read receipt is received.

Param onMessageReactionDidChange Occurs when the Reaction data changes.

Param onMessageContentChanged Occurs when the message content is modified.

Implementation

ChatEventHandler({
  this.onMessagesReceived,
  this.onCmdMessagesReceived,
  this.onMessagesRead,
  this.onGroupMessageRead,
  this.onReadAckForGroupMessageUpdated,
  this.onMessagesDelivered,
  this.onMessagesRecalled,
  this.onConversationsUpdate,
  this.onConversationRead,
  this.onMessageReactionDidChange,
  this.onMessageContentChanged,
});