fromMap static method
override
Construct from Map.
Implementation
static InputMessageVideo? 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 video = InputFile.fromMap(_map['video'])!;
var thumbnail = InputThumbnail.fromMap(_map['thumbnail']);
var added_sticker_file_ids = List<int>.from(
(_map["added_sticker_file_ids"] ?? []).map(
(e) => e as int,
),
);
var duration = _map['duration']! as int;
var width = _map['width']! as int;
var height = _map['height']! as int;
var supports_streaming = _map['supports_streaming']! as bool;
var caption = FormattedText.fromMap(_map['caption']);
var self_destruct_type =
MessageSelfDestructType.fromMap(_map['self_destruct_type']);
var has_spoiler = _map['has_spoiler']! as bool;
return InputMessageVideo(
extra: extra,
clientId: clientId,
video: video,
thumbnail: thumbnail,
added_sticker_file_ids: added_sticker_file_ids,
duration: duration,
width: width,
height: height,
supports_streaming: supports_streaming,
caption: caption,
self_destruct_type: self_destruct_type,
has_spoiler: has_spoiler,
);
}