createTxtSendMessage method

EMMessage createTxtSendMessage({
  1. required String username,
  2. required String content,
})

Creates a text 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 content The text content.

Return The message instance.

Implementation

EMMessage createTxtSendMessage({
  required String username,
  required String content,
}) {
  return EMMessage.createTxtSendMessage(
    username: username,
    content: content,
  );
}