InlineQueryResults.fromJson constructor

InlineQueryResults.fromJson(
  1. Map<String, dynamic> json
)

Parse from a json

Implementation

factory InlineQueryResults.fromJson(Map<String, dynamic> json) => InlineQueryResults(
  inlineQueryId: int.parse(json['inline_query_id']),
  nextOffset: json['next_offset'],
  results: List<InlineQueryResult>.from((json['results'] ?? []).map((item) => InlineQueryResult.fromJson(item)).toList()),
  switchPmText: json['switch_pm_text'],
  switchPmParameter: json['switch_pm_parameter'],
  extra: json['@extra'],
  clientId: json['@client_id'],
);