ConversationInfo.fromJson constructor

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

Implementation

ConversationInfo.fromJson(Map<String, dynamic> json)
    : conversationID = json['conversationID'] {
  conversationType = json['conversationType'];
  userID = json['userID'];
  groupID = json['groupID'];
  showName = json['showName'];
  faceURL = json['faceURL'];
  recvMsgOpt = json['recvMsgOpt'];
  unreadCount = json['unreadCount'];
  try {
    if (json['latestMsg'] is String) {
      latestMsg = Message.fromJson(jsonDecode(json['latestMsg']));
    } else if (json['latestMsg'] is Map) {
      latestMsg = Message.fromJson(json['latestMsg']);
    }
  } catch (e) {}
  latestMsgSendTime = json['latestMsgSendTime'];
  draftText = json['draftText'];
  draftTextTime = json['draftTextTime'];
  isPinned = json['isPinned'];
  isPrivateChat = json['isPrivateChat'];
  burnDuration = json['burnDuration'];
  isNotInGroup = json['isNotInGroup'];
  groupAtType = json['groupAtType'];
  ex = json['ex'];
  ext = json['ext'];
}