fromMap static method
override
Construct from Map.
Implementation
static InputMessageInvoice? 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 invoice = Invoice.fromMap(_map['invoice'])!;
var title = _map['title']! as String;
var description = _map['description']! as String;
var photo_url = _map['photo_url']! as String;
var photo_size = _map['photo_size']! as int;
var photo_width = _map['photo_width']! as int;
var photo_height = _map['photo_height']! as int;
var payload = _map['payload']! as bytes;
var provider_token = _map['provider_token']! as String;
var provider_data = _map['provider_data']! as String;
var start_parameter = _map['start_parameter'] as String?;
var extended_media_content =
InputMessageContent.fromMap(_map['extended_media_content'])!;
return InputMessageInvoice(
extra: extra,
clientId: clientId,
invoice: invoice,
title: title,
description: description,
photo_url: photo_url,
photo_size: photo_size,
photo_width: photo_width,
photo_height: photo_height,
payload: payload,
provider_token: provider_token,
provider_data: provider_data,
start_parameter: start_parameter,
extended_media_content: extended_media_content,
);
}