EMMessage.createCustomSendMessage constructor Null safety

EMMessage.createCustomSendMessage(
  1. {required String username,
  2. required dynamic event,
  3. Map<String, String>? params}
)

Creates a custom message for sending.

Param username The ID of the message recipient.

  • For a one-to-one chat, it is the username of the peer user.
  • For a group chat, it is the group ID.
  • For a chat room, it is the chat room ID.

Param event The event.

Param Map<String, String>? params The params map.

Return The message instance.

Implementation

EMMessage.createCustomSendMessage(
    {required String username, required event, Map<String, String>? params})
    : this.createSendMessage(
          to: username,
          body: EMCustomMessageBody(event: event, params: params));