fromJson static method
Implementation
static PhotoSize? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return PhotoSize(
type: (json['type'] as String?) ?? '',
photo: File.fromJson(tdMapFromJson(json['photo'])),
width: (json['width'] as int?) ?? 0,
height: (json['height'] as int?) ?? 0,
progressiveSizes: List<int>.from(
tdListFromJson(
json['progressive_sizes'],
).map((item) => int.tryParse((item as dynamic)?.toString() ?? '') ?? 0),
),
);
}