EMMessage class

EMMessage - various types of message

Constructors

EMMessage({bool acked, EMMessageBody body, ChatType chatType, bool delivered, Direction direction, String from, bool listened, String localTime, String msgId, String msgTime, Status status, String to, EMMessageType type, bool unread, bool deliverAcked })
EMMessage.createFileSendMessage(String filePath, String userName)
创建文件类型消息 filePath: 文件路径; userName: 接收方id
EMMessage.createImageSendMessage(String filePath, bool sendOriginalImage, String userName)
创建图片类型消息 filePath: 图片路径; sendOriginalImage: 是否发送原图; userName: 接收方id.
EMMessage.createLocationSendMessage(double latitude, double longitude, String locationAddress, String userName)
创建位置类型消息 latitude: 纬度; longitude: 经度; locationAddress: 位置名称; userName: 接收方id
EMMessage.createReceiveMessage(EMMessageType type)
用于创建各种消息的构造函数 - 接收方。
EMMessage.createSendMessage(EMMessageType type)
用于创建各种消息的构造函数 - 发送方。
EMMessage.createTxtSendMessage(String content, String userName)
创建文本类型消息 content: 消息内容; userName: 接收方id
EMMessage.createVideoSendMessage(String filePath, int timeLength, String userName)
创建视频类型消息 filePath: 视频片断路径; timeLength: 语音时长; userName: 接收方id
EMMessage.createVoiceSendMessage(String filePath, int timeLength, String userName)
创建语音类型消息 filePath: 语音片断路径; timeLength: 语音时长; userName: 接收方id

Properties

acked ↔ bool
是否已读
read / write
body ↔ EMMessageBody
消息body
read / write
chatType ↔ ChatType
消息类型单聊,群聊,聊天室
read / write
conversationId → String
会话id
read-only
direction ↔ Direction
消息反向(发送,接收)
read / write
from ↔ String
消息发送方
read / write
localTime ↔ String
本地时间
read / write
msgId ↔ String
消息id
read / write
msgTime ↔ String
服务器时间
read / write
status ↔ Status
消息发送状态
read / write
to ↔ String
消息接收方
read / write
type EMMessageType
消息类型文字,图片,语音...
read / write
unread ↔ bool
是否未读
read / write
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

ext() → Map
TODO: setMessageStatusCallback (EMCallBack callback) ext
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited