EMMessage.createCmdSendMessage constructor Null safety

EMMessage.createCmdSendMessage(
  1. {required String targetId,
  2. required dynamic action,
  3. bool deliverOnlineOnly = false}
)

Creates a command message for sending.

Param targetId 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 action The command action.

Return The message instance.

Implementation

EMMessage.createCmdSendMessage({
  required String targetId,
  required action,
  bool deliverOnlineOnly = false,
}) : this.createSendMessage(
          to: targetId,
          body: EMCmdMessageBody(
              action: action, deliverOnlineOnly: deliverOnlineOnly));