fromMap static method
override
Construct from Map.
Implementation
static InputMessageAnimation? 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 animation = InputFile.fromMap(_map['animation'])!;
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 caption = FormattedText.fromMap(_map['caption']);
var has_spoiler = _map['has_spoiler']! as bool;
return InputMessageAnimation(
extra: extra,
clientId: clientId,
animation: animation,
thumbnail: thumbnail,
added_sticker_file_ids: added_sticker_file_ids,
duration: duration,
width: width,
height: height,
caption: caption,
has_spoiler: has_spoiler,
);
}