MessageVideo.fromJson constructor

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

Parses a MessageVideo from TDLib JSON.

Implementation

factory MessageVideo.fromJson(Map<String, dynamic> json) => MessageVideo(
  video: _readObject(json['video'], Video.fromJson),
  alternativeVideos: _readList<AlternativeVideo>(
    json['alternative_videos'],
    (e) => _readObject(e, AlternativeVideo.fromJson),
  ),
  storyboards: _readList<VideoStoryboard>(
    json['storyboards'],
    (e) => _readObject(e, VideoStoryboard.fromJson),
  ),
  cover: _readOptional(json['cover'], Photo.fromJson),
  startTimestamp: _readInt(json['start_timestamp']),
  caption: _readObject(json['caption'], FormattedText.fromJson),
  showCaptionAboveMedia: _readBool(json['show_caption_above_media']),
  hasSpoiler: _readBool(json['has_spoiler']),
  isSecret: _readBool(json['is_secret']),
);