toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['topicID'] = topicID;
  data['topicName'] = topicName;
  data['topicFaceUrl'] = topicFaceUrl;
  data['introduction'] = introduction;
  data['notification'] = notification;
  data['isAllMute'] = isAllMute;
  data['selfMuteTime'] = selfMuteTime;
  data['customString'] = customString;
  data['draftText'] = draftText;
  data['unreadCount'] = unreadCount;
  data['recvOpt'] = recvOpt;
  data['lastMessage'] = lastMessage?.toJson();
  data['defaultPermissions'] = defaultPermissions ?? 0;
  data['readSequence'] = readSequence ?? 0;
  if (groupAtInfoList != null) {
    data['groupAtInfoList'] = groupAtInfoList!.map((v) => v.toJson()).toList();
  }
  return data;
}