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'];
  platformID = json['platformID'];
  senderNickname = json['senderNickname'];
  senderFaceUrl = json['senderFaceUrl'];
  groupID = json['groupID'];
  content = json['content'];
  seq = json['seq'];
  isRead = json['isRead'];
  status = json['status'];
  offlinePush = json['offlinePush'] != null
      ? OfflinePushInfo.fromJson(json['offlinePush'])
      : null;
  attachedInfo = json['attachedInfo'];
  ex = json['ex'];
  ext = json['ext'];
  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;
  atElem = json['atElem'] != null ? AtElem.fromJson(json['atElem']) : 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;
  isExternal = json['isExternal'];
  isReact = json['isReact'];
}