MessageEntity class

消息实体

Constructors

MessageEntity({required String msgID, int? timestamp, String? sender, String? nickName, String? friendRemark, String? faceUrl, String? nameCard, String? groupID, String? userID, required MessageStatusEnum? status, MessageElemTypeEnum? elemType, String? localCustomData, int? localCustomInt, bool? self = true, bool? read = true, bool? peerRead = false, MessagePriorityEnum? priority, OfflinePushInfoEntity? offlinePushInfo, List<String>? groupAtUserList, int? seq, String? note, MessageNode? node, int? random})
MessageEntity.fromJson(dynamic data)

Properties

elemType MessageElemTypeEnum?
消息类型
getter/setter pair
faceUrl String?
发送者头像 url
getter/setter pair
friendRemark String?
好友备注。如果没有拉取过好友信息或者不是好友,返回 null
getter/setter pair
groupAtUserList List<String>?
群@用户列表
getter/setter pair
groupID String?
群组消息,groupID 为接收消息的群组 ID,否则为 null
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
localCustomData String?
消息自定义数据(本地保存,不会发送到对端,程序卸载重装后失效)
getter/setter pair
localCustomInt int?
消息自定义数据(本地保存,不会发送到对端,程序卸载重装后失效)
getter/setter pair
msgID String
消息 ID
getter/setter pair
nameCard String?
群组消息,nameCard 为发送者的群名片
getter/setter pair
nickName String?
消息发送者昵称
getter/setter pair
node MessageNode?
消息节点信息
getter/setter pair
note String?
描述信息,描述当前消息,可直接用于显示
getter/setter pair
offlinePushInfo OfflinePushInfoEntity?
消息的离线推送信息
getter/setter pair
peerRead bool?
消息对方是否已读(只有 C2C 消息有效)
getter/setter pair
priority MessagePriorityEnum?
消息优先级
getter/setter pair
random int?
消息随机码
getter/setter pair
read bool?
消息自己是否已读
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
self bool?
消息发送者是否是自己
getter/setter pair
sender String?
消息发送者 userID
getter/setter pair
seq int?
消息的序列号 群聊中的消息序列号云端生成,在群里是严格递增且唯一的。 单聊中的序列号是本地生成,不能保证严格递增且唯一。
getter/setter pair
status MessageStatusEnum?
消息发送状态
getter/setter pair
timestamp int?
消息时间戳
getter/setter pair
userID String?
单聊消息,userID 为会话用户 ID,否则为 null。 假设自己和 userA 聊天,无论是自己发给 userA 的消息还是 userA 发给自己的消息,这里的 userID 均为 userA
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override