InputPhoto.fromJson constructor

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

Parses a InputPhoto from TDLib JSON.

Implementation

factory InputPhoto.fromJson(Map<String, dynamic> json) => InputPhoto(
  photo: _readObject(json['photo'], InputFile.fromJson),
  thumbnail: _readOptional(json['thumbnail'], InputThumbnail.fromJson),
  video: _readOptional(json['video'], InputFile.fromJson),
  addedStickerFileIds: _readList<int>(
    json['added_sticker_file_ids'],
    _readInt,
  ),
  width: _readInt(json['width']),
  height: _readInt(json['height']),
);