PhotoSize.fromJson constructor

PhotoSize.fromJson(
  1. Map<String, dynamic> json
)

Parse from a json

Implementation

PhotoSize.fromJson(Map<String, dynamic> json) {
  this.type = json['type'];
  this.photo = File.fromJson(json['photo'] ?? <String, dynamic>{});
  this.width = json['width'];
  this.height = json['height'];
  this.progressiveSizes = List<int>.from(
      (json['progressive_sizes'] ?? []).map((item) => item).toList());
}