InlineQueryResultsButtonType.fromJson constructor

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

Parses whichever InlineQueryResultsButtonType subtype the JSON describes.

Implementation

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