fromMap static method
override
Construct from Map.
Implementation
static InputInlineQueryResultDocument? 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 id = _map['id']! as String;
var title = _map['title']! as String;
var description = _map['description']! as String;
var document_url = _map['document_url']! as String;
var mime_type = _map['mime_type']! as String;
var thumbnail_url = _map['thumbnail_url']! as String;
var thumbnail_width = _map['thumbnail_width']! as int;
var thumbnail_height = _map['thumbnail_height']! as int;
var reply_markup = ReplyMarkup.fromMap(_map['reply_markup']);
var input_message_content =
InputMessageContent.fromMap(_map['input_message_content'])!;
return InputInlineQueryResultDocument(
extra: extra,
clientId: clientId,
id: id,
title: title,
description: description,
document_url: document_url,
mime_type: mime_type,
thumbnail_url: thumbnail_url,
thumbnail_width: thumbnail_width,
thumbnail_height: thumbnail_height,
reply_markup: reply_markup,
input_message_content: input_message_content,
);
}