Message class
消息记录,对应 MessageRecord / ImMessagePayloadBody
Constructors
-
Message({String msgId = '', String sequence = '0', int msgType = MsgType.text, int fromId = 0, String nickname = '', String avatar = '', int isRevoked = YesNo.no, String sendTime = '', Map<
String, dynamic> ? extra, Map<String, dynamic> ? quote, int talkMode = TalkMode.private, int toFromId = 0, int status = 0}) -
Message.fromJson(Map<
String, dynamic> json) -
factory
-
Message.fromPushPayload(Map<
String, dynamic> payload) -
从 WS
im.message推送帧构建 Messagefactory
Properties
- avatar ↔ String
-
getter/setter pair
-
extra
↔ Map<
String, dynamic> ? -
extra / quote 在服务端多为 JSON 字符串,SDK 内统一解析为 Map
getter/setter pair
- fromId ↔ int
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFlashRead → bool
-
no setter
- isPending → bool
-
no setter
- isRevoked ↔ int
-
getter/setter pair
- msgId ↔ String
-
getter/setter pair
- msgType ↔ int
-
getter/setter pair
- nickname ↔ String
-
getter/setter pair
- previewText → String
-
no setter
-
quote
↔ Map<
String, dynamic> ? -
getter/setter pair
- revoked → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendTime ↔ String
-
getter/setter pair
- seq → int
-
将 sequence 解析为整数(仅用于本地排序/比较,非独立字段)
no setter
- sequence ↔ String
-
getter/setter pair
- status ↔ int
-
本地发送状态:0 成功/已收,1 发送中,2 失败
getter/setter pair
- talkMode ↔ int
-
推送外层会话上下文
getter/setter pair
- toFromId ↔ int
-
getter/setter pair
Methods
-
copyWith(
{String? msgId, String? sequence, int? msgType, int? fromId, String? nickname, String? avatar, int? isRevoked, String? sendTime, Map< String, dynamic> ? extra, Map<String, dynamic> ? quote, int? talkMode, int? toFromId, int? status}) → Message -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toStorageMap(
{required int ownerId}) → Map< String, dynamic> - 落库用扁平 Map
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited