generated from GDGVIT/template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: gallery and app bar UI fixes * feat: theme history ui * feat: history integration + home ui fixes
- Loading branch information
1 parent
f7f19ad
commit eed2e87
Showing
14 changed files
with
653 additions
and
246 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
class HistoryModel { | ||
final String src; | ||
final Artist artist; | ||
final Art art; | ||
final String id; | ||
|
||
HistoryModel({ | ||
required this.src, | ||
required this.artist, | ||
required this.art, | ||
required this.id, | ||
}); | ||
|
||
factory HistoryModel.fromJson(Map<String, dynamic> json) { | ||
return HistoryModel( | ||
src: json['src'], | ||
artist: Artist.fromJson(json['artist']), | ||
art: Art.fromJson(json['art']), | ||
id: json['_id'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'src': src, | ||
'artist': artist.toJson(), | ||
'art': art.toJson(), | ||
'_id': id, | ||
}; | ||
} | ||
} | ||
|
||
class Artist { | ||
final String name; | ||
final String period; | ||
|
||
Artist({ | ||
required this.name, | ||
required this.period, | ||
}); | ||
|
||
factory Artist.fromJson(Map<String, dynamic> json) { | ||
return Artist( | ||
name: json['name'], | ||
period: json['period'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'name': name, | ||
'period': period, | ||
}; | ||
} | ||
} | ||
|
||
class Art { | ||
final String year; | ||
|
||
Art({ | ||
required this.year, | ||
}); | ||
|
||
factory Art.fromJson(Map<String, dynamic> json) { | ||
return Art( | ||
year: json['year'], | ||
); | ||
} | ||
|
||
Map<String, dynamic> toJson() { | ||
return { | ||
'year': year, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.