fromMap static method

InputInlineQueryResultLocation? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static InputInlineQueryResultLocation? 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 location = Location.fromMap(_map['location'])!;
  var live_period = _map['live_period']! as int;
  var title = _map['title']! 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 InputInlineQueryResultLocation(
    extra: extra,
    clientId: clientId,
    id: id,
    location: location,
    live_period: live_period,
    title: title,
    thumbnail_url: thumbnail_url,
    thumbnail_width: thumbnail_width,
    thumbnail_height: thumbnail_height,
    reply_markup: reply_markup,
    input_message_content: input_message_content,
  );
}