V2TimMessage.fromJson constructor

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

Implementation

V2TimMessage.fromJson(Map<String, dynamic> json) {
  msgID = json['msgID'];
  timestamp = json['timestamp'];
  progress = json['progress'];
  sender = json['sender'];
  nickName = json['nickName'];
  friendRemark = json['friendRemark'];
  faceUrl = json['faceUrl'];
  nameCard = json['nameCard'];
  groupID = json['groupID'];
  userID = json['userID'];
  status = json['status'];
  elemType = json['elemType'];
  id = json['id'];
  needReadReceipt = json['needReadReceipt'];
  textElem = json['textElem'] != null
      ? V2TimTextElem.fromJson(json['textElem'])
      : null;
  customElem = json['customElem'] != null
      ? V2TimCustomElem.fromJson(json['customElem'])
      : null;
  imageElem = json['imageElem'] != null
      ? V2TimImageElem.fromJson(json['imageElem'])
      : null;
  soundElem = json['soundElem'] != null
      ? V2TimSoundElem.fromJson(json['soundElem'])
      : null;
  videoElem = json['videoElem'] != null
      ? V2TimVideoElem.fromJson(json['videoElem'])
      : null;
  fileElem = json['fileElem'] != null
      ? V2TimFileElem.fromJson(json['fileElem'])
      : null;
  locationElem = json['locationElem'] != null
      ? V2TimLocationElem.fromJson(json['locationElem'])
      : null;
  faceElem = json['faceElem'] != null
      ? V2TimFaceElem.fromJson(json['faceElem'])
      : null;
  groupTipsElem = json['groupTipsElem'] != null
      ? V2TimGroupTipsElem.fromJson(json['groupTipsElem'])
      : null;
  mergerElem = json['mergerElem'] != null
      ? V2TimMergerElem.fromJson(json['mergerElem'])
      : null;
  localCustomData = json['localCustomData'] ?? "";
  localCustomInt = json['localCustomInt'];
  cloudCustomData = json['cloudCustomData'] ?? "";
  isSelf = json['isSelf'];
  isRead = json['isRead'];
  isPeerRead = json['isPeerRead'];
  priority = json['priority'];
  offlinePushInfo = json['offlinePushInfo'] != null
      ? V2TimOfflinePushInfo.fromJson(json['offlinePushInfo'])
      : null;
  groupAtUserList = json['groupAtUserList'] != null
      ? json['groupAtUserList'].cast<String>()
      : List.empty(growable: true);
  seq = json['seq'];
  random = json['random'];
  isExcludedFromUnreadCount = json['isExcludedFromUnreadCount'];
  isExcludedFromLastMessage = json['isExcludedFromLastMessage'];
  messageFromWeb = json['messageFromWeb'];
}