Image.fromJson constructor
Implementation
Image.fromJson(Map<String, dynamic> json) {
id = json['id'];
src = (json['src'] is String ? json['src'] : json['src'].toString());
name = json['name'];
alt = json['alt'];
if (json['date_created'] != null) {
dateCreated = DateTime.parse(json['date_created']);
}
if (json['date_modified_gmt'] != null) {
dateModifiedGMT = DateTime.parse(json['date_modified_gmt']);
}
if (json['date_modified'] != null) {
dateModified = DateTime.parse(json['date_modified']);
}
if (json['date_created_gmt'] != null) {
dateCreatedGMT = DateTime.parse(json['date_created_gmt']);
}
}