fromMap static method
override
Construct from Map.
Implementation
static InputMessageDocument? 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 document = InputFile.fromMap(_map['document'])!;
var thumbnail = InputThumbnail.fromMap(_map['thumbnail']);
var disable_content_type_detection =
_map['disable_content_type_detection']! as bool;
var caption = FormattedText.fromMap(_map['caption']);
return InputMessageDocument(
extra: extra,
clientId: clientId,
document: document,
thumbnail: thumbnail,
disable_content_type_detection: disable_content_type_detection,
caption: caption,
);
}