InputMessagePhoto.fromJson constructor

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

Parse from a json

Implementation

factory InputMessagePhoto.fromJson(Map<String, dynamic> json) =>
    InputMessagePhoto(
      photo: InputFile.fromJson(json['photo']),
      thumbnail: json['thumbnail'] == null
          ? null
          : InputThumbnail.fromJson(json['thumbnail']),
      addedStickerFileIds: List<int>.from(
          (json['added_sticker_file_ids'] ?? [])
              .map((item) => item)
              .toList()),
      width: json['width'],
      height: json['height'],
      caption: json['caption'] == null
          ? null
          : FormattedText.fromJson(json['caption']),
      selfDestructTime: json['self_destruct_time'],
      hasSpoiler: json['has_spoiler'],
    );