fromJson static method
Implementation
static InlineQueryResults? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return InlineQueryResults(
inlineQueryId:
int.tryParse(
(json['inline_query_id'] as dynamic)?.toString() ?? '',
) ??
0,
button: InlineQueryResultsButton.fromJson(tdMapFromJson(json['button'])),
results: List<InlineQueryResult>.from(
tdListFromJson(json['results'])
.map((item) => InlineQueryResult.fromJson(tdMapFromJson(item)))
.whereType<InlineQueryResult>(),
),
nextOffset: (json['next_offset'] as String?) ?? '',
);
}