fromMap static method

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

Construct from Map.

Implementation

static InlineQueryResultArticle? 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 url = _map['url']! as String;
  var hide_url = _map['hide_url']! as bool;
  var title = _map['title']! as String;
  var description = _map['description']! as String;
  var thumbnail = Thumbnail.fromMap(_map['thumbnail']);
  return InlineQueryResultArticle(
    extra: extra,
    clientId: clientId,
    id: id,
    url: url,
    hide_url: hide_url,
    title: title,
    description: description,
    thumbnail: thumbnail,
  );
}