InputMessagePhoto.fromJson constructor

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

Parses a InputMessagePhoto from TDLib JSON.

Implementation

factory InputMessagePhoto.fromJson(Map<String, dynamic> json) =>
    InputMessagePhoto(
      photo: _readObject(json['photo'], InputFile.fromJson),
      thumbnail: _readOptional(json['thumbnail'], InputThumbnail.fromJson),
      addedStickerFileIds:
          _readList<int>(json['added_sticker_file_ids'], _readInt),
      width: _readInt(json['width']),
      height: _readInt(json['height']),
      caption: _readOptional(json['caption'], FormattedText.fromJson),
      selfDestructType: _readOptional(
          json['self_destruct_type'], MessageSelfDestructType.fromJson),
      hasSpoiler: _readBool(json['has_spoiler']),
    );