V2TimConversation.fromJson constructor
V2TimConversation.fromJson(
- Map<String, dynamic> json
)
Implementation
V2TimConversation.fromJson(Map<String, dynamic> json) {
conversationID = json['conversationID'];
type = json['type'];
userID = json['userID'];
groupID = json['groupID'];
showName = json['showName'];
faceUrl = json['faceUrl'];
groupType = json['groupType'];
unreadCount = json['unreadCount'];
isPinned = json['isPinned'];
recvOpt = json['recvOpt'];
orderkey = json['orderkey'];
lastMessage = json['lastMessage'] != null
? V2TimMessage.fromJson(json['lastMessage'])
: null;
draftText = json['draftText'];
customData = json['customData'];
draftTimestamp = json['draftTimestamp'];
if (json['markList'] != null) {
markList = List.empty(growable: true);
json['markList'].forEach((v) {
markList?.add(v);
});
}
if (json['conversationGroupList'] != null) {
conversationGroupList = List.empty(growable: true);
json['conversationGroupList'].forEach((v) {
conversationGroupList?.add(v);
});
}
if (json['groupAtInfoList'] != null) {
groupAtInfoList = List.empty(growable: true);
json['groupAtInfoList'].forEach((v) {
groupAtInfoList!.add(V2TimGroupAtInfo.fromJson(v));
});
}
}