sendMessage method
Sends a message.
Note For attachment messages such as voice, image, or video messages, the SDK automatically uploads the attachment. You can set whether to upload the attachment to the chat sever using {@link EMOptions#serverTransfer(boolean)}.
To listen for the status of sending messages, call {@link EMMessage#setMessageStatusListener(EMMessageStatusListener)}.
Param message The message object to be sent: {@link EMMessage}.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<EMMessage> sendMessage(EMMessage message) async {
return EMClient.getInstance.chatManager.sendMessage(message);
}