fromMap static method
override
Construct from Map.
Implementation
static Video? fromMap(Map<String, dynamic>? _map) {
if (_map == null) return null;
var _ = _map["@type"];
if (_ != CONSTRUCTOR) return null;
var extra = _map['@extra'];
var clientId = _map['@clientId'];
var duration = _map['duration']! as int;
var width = _map['width']! as int;
var height = _map['height']! as int;
var file_name = _map['file_name']! as String;
var mime_type = _map['mime_type']! as String;
var has_stickers = _map['has_stickers']! as bool;
var supports_streaming = _map['supports_streaming']! as bool;
var minithumbnail = Minithumbnail.fromMap(_map['minithumbnail']);
var thumbnail = Thumbnail.fromMap(_map['thumbnail']);
var video = File.fromMap(_map['video'])!;
return Video(
extra: extra,
clientId: clientId,
duration: duration,
width: width,
height: height,
file_name: file_name,
mime_type: mime_type,
has_stickers: has_stickers,
supports_streaming: supports_streaming,
minithumbnail: minithumbnail,
thumbnail: thumbnail,
video: video,
);
}