class ParentList { ParentList({ required this.dbId, required this.text, required this.path, required this.isSelected, }); int dbId; String text; String path; bool isSelected; factory ParentList.fromJson(Map json) => ParentList( dbId: json["dbId"] == null ? null : json["dbId"], text: json["text"] == null ? null : json["text"], path: json["path"] == null ? null : json["path"], isSelected: false, ); Map toJson() => { "dbId": dbId == null ? null : dbId, "text": text == null ? null : text, "path": path == null ? null : path, }; }