Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PaintingResponse {
- List<Painting> paintings;
- PaintingResponse(this.paintings);
- PaintingResponse.fromJson(Map<String, dynamic> json) {
- if (json['Paintings'] != null) {
- paintings = new List<Painting>();
- json['Paintings'].forEach((v) {
- paintings.add(new Painting.fromJson(v));
- });
- }
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- if (this.paintings != null) {
- data['Paintings'] = this.paintings.map((v) => v.toJson()).toList();
- }
- return data;
- }
- }
Add Comment
Please, Sign In to add comment