fromJson static method

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

Implementation

static InputInlineQueryResult? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  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 null;
  }
}