Message.fromJson constructor

Message.fromJson(
  1. Map<String, dynamic> json
)

Implementation

Message.fromJson(Map<String, dynamic> json) {
  clientMsgID = json['clientMsgID'];
  serverMsgID = json['serverMsgID'];
  createTime = json['createTime'];
  sendTime = json['sendTime'];
  sendID = json['sendID'];
  recvID = json['recvID'];
  msgFrom = json['msgFrom'];
  contentType = json['contentType'];
  senderPlatformID = json['senderPlatformID'];
  senderNickname = json['senderNickname'];
  senderFaceUrl = json['senderFaceUrl'];
  groupID = json['groupID'];
  localEx = json['localEx'];
  seq = json['seq'];
  isRead = json['isRead'];
  status = json['status'];
  offlinePush = json['offlinePush'] != null ? OfflinePushInfo.fromJson(json['offlinePush']) : null;
  attachedInfo = json['attachedInfo'];
  ex = json['ex'];
  exMap = json['exMap'] ?? {};
  sessionType = json['sessionType'];
  pictureElem = json['pictureElem'] != null ? PictureElem.fromJson(json['pictureElem']) : null;
  soundElem = json['soundElem'] != null ? SoundElem.fromJson(json['soundElem']) : null;
  videoElem = json['videoElem'] != null ? VideoElem.fromJson(json['videoElem']) : null;
  fileElem = json['fileElem'] != null ? FileElem.fromJson(json['fileElem']) : null;
  atTextElem = json['atTextElem'] != null ? AtTextElem.fromJson(json['atTextElem']) : null;
  locationElem = json['locationElem'] != null ? LocationElem.fromJson(json['locationElem']) : null;

  customElem = json['customElem'] != null ? CustomElem.fromJson(json['customElem']) : null;
  quoteElem = json['quoteElem'] != null ? QuoteElem.fromJson(json['quoteElem']) : null;
  mergeElem = json['mergeElem'] != null ? MergeElem.fromJson(json['mergeElem']) : null;
  notificationElem = json['notificationElem'] != null ? NotificationElem.fromJson(json['notificationElem']) : null;
  faceElem = json['faceElem'] != null ? FaceElem.fromJson(json['faceElem']) : null;
  attachedInfoElem = json['attachedInfoElem'] != null ? AttachedInfoElem.fromJson(json['attachedInfoElem']) : null;
  hasReadTime = json['hasReadTime'] ?? attachedInfoElem?.hasReadTime;
  isExternalExtensions = json['isExternalExtensions'];
  isReact = json['isReact'];
  textElem = json['textElem'] != null ? TextElem.fromJson(json['textElem']) : null;
  cardElem = json['cardElem'] != null ? CardElem.fromJson(json['cardElem']) : null;
  advancedTextElem = json['advancedTextElem'] != null ? AdvancedTextElem.fromJson(json['advancedTextElem']) : null;
  typingElem = json['typingElem'] != null ? TypingElem.fromJson(json['typingElem']) : null;
}