PhotoSize.fromJson constructor

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

Parses a PhotoSize from TDLib JSON.

Implementation

factory PhotoSize.fromJson(Map<String, dynamic> json) => PhotoSize(
  type: _readString(json['type']),
  photo: _readObject(json['photo'], File.fromJson),
  width: _readInt(json['width']),
  height: _readInt(json['height']),
  progressiveSizes: _readList<int>(json['progressive_sizes'], _readInt),
);