InputInlineQueryResult.fromJson constructor

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

Implementation

factory InputInlineQueryResult.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case InputInlineQueryResultAnimation.CONSTRUCTOR:
      return InputInlineQueryResultAnimation.fromJson(json);
    case InputInlineQueryResultArticle.CONSTRUCTOR:
      return InputInlineQueryResultArticle.fromJson(json);
    case InputInlineQueryResultAudio.CONSTRUCTOR:
      return InputInlineQueryResultAudio.fromJson(json);
    case InputInlineQueryResultContact.CONSTRUCTOR:
      return InputInlineQueryResultContact.fromJson(json);
    case InputInlineQueryResultDocument.CONSTRUCTOR:
      return InputInlineQueryResultDocument.fromJson(json);
    case InputInlineQueryResultGame.CONSTRUCTOR:
      return InputInlineQueryResultGame.fromJson(json);
    case InputInlineQueryResultLocation.CONSTRUCTOR:
      return InputInlineQueryResultLocation.fromJson(json);
    case InputInlineQueryResultPhoto.CONSTRUCTOR:
      return InputInlineQueryResultPhoto.fromJson(json);
    case InputInlineQueryResultSticker.CONSTRUCTOR:
      return InputInlineQueryResultSticker.fromJson(json);
    case InputInlineQueryResultVenue.CONSTRUCTOR:
      return InputInlineQueryResultVenue.fromJson(json);
    case InputInlineQueryResultVideo.CONSTRUCTOR:
      return InputInlineQueryResultVideo.fromJson(json);
    case InputInlineQueryResultVoiceNote.CONSTRUCTOR:
      return InputInlineQueryResultVoiceNote.fromJson(json);
    default:
      return const InputInlineQueryResult();
  }
}