InputMessageVideo.fromJson constructor

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

Parses a InputMessageVideo from TDLib JSON.

Implementation

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