V2TimTopicInfo.fromJson constructor

V2TimTopicInfo.fromJson(
  1. Map json
)

Implementation

V2TimTopicInfo.fromJson(Map json) {
  json = Utils.formatJson(json);
  topicID = json['topicID'];
  topicName = json['topicName'];
  topicFaceUrl = json['topicFaceUrl'];
  introduction = json['introduction'];
  notification = json['notification'];
  isAllMute = json['isAllMute'];
  selfMuteTime = json['selfMuteTime'];
  customString = json['customString'];
  draftText = json['draftText'];
  recvOpt = json['recvOpt'];
  unreadCount = json['unreadCount'];
  defaultPermissions = json["defaultPermissions"] ?? 0;
  if (json['lastMessage'] != null) {
    lastMessage = V2TimMessage.fromJson(json['lastMessage']);
  }
  if (json['groupAtInfoList'] != null) {
    groupAtInfoList = List.empty(growable: true);
    json['groupAtInfoList'].forEach((v) {
      groupAtInfoList!.add(V2TimGroupAtInfo.fromJson(v));
    });
  }
}