create static method

InlineQueryResult create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "inlineQueryResult",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "inlineQueryResult",
  5. InlineQueryResultArticle? inline_query_result_article,
  6. InlineQueryResultContact? inline_query_result_contact,
  7. InlineQueryResultLocation? inline_query_result_location,
  8. InlineQueryResultVenue? inline_query_result_venue,
  9. InlineQueryResultGame? inline_query_result_game,
  10. InlineQueryResultAnimation? inline_query_result_animation,
  11. InlineQueryResultAudio? inline_query_result_audio,
  12. InlineQueryResultDocument? inline_query_result_document,
  13. InlineQueryResultPhoto? inline_query_result_photo,
  14. InlineQueryResultSticker? inline_query_result_sticker,
  15. InlineQueryResultVideo? inline_query_result_video,
  16. InlineQueryResultVoiceNote? inline_query_result_voice_note,
  17. InlineQueryResultsButtonTypeStartBot? inline_query_results_button_type_start_bot,
  18. InlineQueryResultsButtonTypeWebApp? inline_query_results_button_type_web_app,
  19. InlineQueryResultsButton? inline_query_results_button,
  20. InlineQueryResults? inline_query_results,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static InlineQueryResult create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "inlineQueryResult",
  bool special_is_json_scheme_class = true,
  String special_return_type = "inlineQueryResult",
  InlineQueryResultArticle? inline_query_result_article,
  InlineQueryResultContact? inline_query_result_contact,
  InlineQueryResultLocation? inline_query_result_location,
  InlineQueryResultVenue? inline_query_result_venue,
  InlineQueryResultGame? inline_query_result_game,
  InlineQueryResultAnimation? inline_query_result_animation,
  InlineQueryResultAudio? inline_query_result_audio,
  InlineQueryResultDocument? inline_query_result_document,
  InlineQueryResultPhoto? inline_query_result_photo,
  InlineQueryResultSticker? inline_query_result_sticker,
  InlineQueryResultVideo? inline_query_result_video,
  InlineQueryResultVoiceNote? inline_query_result_voice_note,
  InlineQueryResultsButtonTypeStartBot? inline_query_results_button_type_start_bot,
  InlineQueryResultsButtonTypeWebApp? inline_query_results_button_type_web_app,
  InlineQueryResultsButton? inline_query_results_button,
  InlineQueryResults? inline_query_results,
}) {
  // InlineQueryResult inlineQueryResult = InlineQueryResult({
  final Map inlineQueryResult_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "inline_query_result_article": (inline_query_result_article != null) ? inline_query_result_article.toJson() : null,
    "inline_query_result_contact": (inline_query_result_contact != null) ? inline_query_result_contact.toJson() : null,
    "inline_query_result_location": (inline_query_result_location != null) ? inline_query_result_location.toJson() : null,
    "inline_query_result_venue": (inline_query_result_venue != null) ? inline_query_result_venue.toJson() : null,
    "inline_query_result_game": (inline_query_result_game != null) ? inline_query_result_game.toJson() : null,
    "inline_query_result_animation": (inline_query_result_animation != null) ? inline_query_result_animation.toJson() : null,
    "inline_query_result_audio": (inline_query_result_audio != null) ? inline_query_result_audio.toJson() : null,
    "inline_query_result_document": (inline_query_result_document != null) ? inline_query_result_document.toJson() : null,
    "inline_query_result_photo": (inline_query_result_photo != null) ? inline_query_result_photo.toJson() : null,
    "inline_query_result_sticker": (inline_query_result_sticker != null) ? inline_query_result_sticker.toJson() : null,
    "inline_query_result_video": (inline_query_result_video != null) ? inline_query_result_video.toJson() : null,
    "inline_query_result_voice_note": (inline_query_result_voice_note != null) ? inline_query_result_voice_note.toJson() : null,
    "inline_query_results_button_type_start_bot": (inline_query_results_button_type_start_bot != null) ? inline_query_results_button_type_start_bot.toJson() : null,
    "inline_query_results_button_type_web_app": (inline_query_results_button_type_web_app != null) ? inline_query_results_button_type_web_app.toJson() : null,
    "inline_query_results_button": (inline_query_results_button != null) ? inline_query_results_button.toJson() : null,
    "inline_query_results": (inline_query_results != null) ? inline_query_results.toJson() : null,
  };

  inlineQueryResult_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (inlineQueryResult_data_create_json.containsKey(key) == false) {
        inlineQueryResult_data_create_json[key] = value;
      }
    });
  }
  return InlineQueryResult(inlineQueryResult_data_create_json);
}