EMMessage.createReceiveMessage constructor

EMMessage.createReceiveMessage(
  1. {required EMMessageBody body,
  2. ChatType chatType = ChatType.Chat}
)

创建一条接收消息。

Param body 消息体。

Param chatType 聊天类型, 默认为单聊,如果是群聊或者聊天室,可以参考ChatType

Return 消息实例。

Implementation

EMMessage.createReceiveMessage({
  required this.body,
  this.chatType = ChatType.Chat,
}) {
  this.onlineState = true;
  this.direction = MessageDirection.RECEIVE;
}