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