Video.fromJson constructor

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

Parses a Video from TDLib JSON.

Implementation

factory Video.fromJson(Map<String, dynamic> json) => Video(
  duration: _readInt(json['duration']),
  width: _readInt(json['width']),
  height: _readInt(json['height']),
  fileName: _readString(json['file_name']),
  mimeType: _readString(json['mime_type']),
  hasStickers: _readBool(json['has_stickers']),
  supportsStreaming: _readBool(json['supports_streaming']),
  minithumbnail: _readOptional(json['minithumbnail'], Minithumbnail.fromJson),
  thumbnail: _readOptional(json['thumbnail'], Thumbnail.fromJson),
  video: _readObject(json['video'], File.fromJson),
);