StoryVideo.fromJson constructor

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

Parses a StoryVideo from TDLib JSON.

Implementation

factory StoryVideo.fromJson(Map<String, dynamic> json) => StoryVideo(
      duration: _readDouble(json['duration']),
      width: _readInt(json['width']),
      height: _readInt(json['height']),
      hasStickers: _readBool(json['has_stickers']),
      isAnimation: _readBool(json['is_animation']),
      minithumbnail:
          _readOptional(json['minithumbnail'], Minithumbnail.fromJson),
      thumbnail: _readOptional(json['thumbnail'], Thumbnail.fromJson),
      preloadPrefixSize: _readInt(json['preload_prefix_size']),
      video: _readObject(json['video'], File.fromJson),
    );