EMMessage.createReceiveMessage constructor
EMMessage.createReceiveMessage({
- required EMMessageBody body,
- ChatType chatType = ChatType.Chat,
~english Creates a received message instance.
Param body
The message body.
Param chatType
The chat type. The default chat type is one-to-one chat. For the group chat or chat room, see ChatType
.
Return The message instance. ~end
~chinese 创建一条接收消息。
Param body
消息体。
Param chatType
聊天类型, 默认为单聊,如果是群聊或者聊天室,可以参考ChatType
。
Return 消息实例。 ~end
Implementation
EMMessage.createReceiveMessage({
required this.body,
this.chatType = ChatType.Chat,
}) {
onlineState = true;
direction = MessageDirection.RECEIVE;
}