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']),
      button: json['button'] == null
          ? null
          : InlineQueryResultsButton.fromJson(json['button']),
      results: List<InlineQueryResult>.from((json['results'] ?? [])
          .map((item) => InlineQueryResult.fromJson(item))
          .toList()),
      nextOffset: json['next_offset'],
      extra: json['@extra'],
      clientId: json['@client_id'],
    );