toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['msgID'] = this.msgID;
if (this.timestamp != null) data['timestamp'] = this.timestamp;
if (this.sender != null) data['sender'] = this.sender;
if (this.nickName != null) data['nickName'] = this.nickName;
if (this.friendRemark != null) data['friendRemark'] = this.friendRemark;
if (this.faceUrl != null) data['faceUrl'] = this.faceUrl;
if (this.nameCard != null) data['nameCard'] = this.nameCard;
if (this.groupID != null) data['groupID'] = this.groupID;
if (this.userID != null) data['userID'] = this.userID;
if (this.status != null)
data['status'] = MessageStatusTool.toInt(this.status!);
if (this.elemType != null)
data['elemType'] = MessageElemTypeTool.toInt(this.elemType!);
if (this.localCustomData != null)
data['localCustomData'] = this.localCustomData;
if (this.localCustomInt != null)
data['localCustomInt'] = this.localCustomInt;
if (this.self != null) data['self'] = this.self;
if (this.read != null) data['read'] = this.read;
if (this.peerRead != null) data['peerRead'] = this.peerRead;
if (this.priority != null)
data['priority'] = MessagePriorityTool.toInt(this.priority!);
if (this.offlinePushInfo != null)
data['offlinePushInfo'] = this.offlinePushInfo!.toJson();
if (this.groupAtUserList != null)
data['groupAtUserList'] = this.groupAtUserList;
if (this.seq != null) data['seq'] = this.seq;
if (this.note != null) data['note'] = this.note;
if (this.random != null) data['random'] = this.random;
return data;
}