PhotoSize.fromJson constructor

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

Parse from a json

Implementation

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