InlineQueryResult.fromJson constructor

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

Parses whichever InlineQueryResult subtype the JSON describes.

Implementation

factory InlineQueryResult.fromJson(Map<String, dynamic> json) {
  final object = tdObjectFactories[json['@type']]?.call(json);
  return object is InlineQueryResult
      ? object
      : UndecodedInlineQueryResult(json);
}