toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['conversationID'] = conversationID;
data['type'] = type;
data['userID'] = userID;
data['groupID'] = groupID;
data['showName'] = showName;
data['faceUrl'] = faceUrl;
data['groupType'] = groupType;
data['unreadCount'] = unreadCount;
data['isPinned'] = isPinned;
data['recvOpt'] = recvOpt;
data['orderkey'] = orderkey;
if (lastMessage != null) {
data['lastMessage'] = lastMessage!.toJson();
}
data['draftText'] = draftText;
data['draftTimestamp'] = draftTimestamp;
if (groupAtInfoList != null) {
data['groupAtInfoList'] =
groupAtInfoList!.map((v) => v!.toJson()).toList();
}
return data;
}