getQuerySuggestions method

Future<YoutubeSearchSuggestions> getQuerySuggestions({
  1. required String query,
})

Implementation

Future<googleapis_client_scheme.YoutubeSearchSuggestions>
    getQuerySuggestions({
  required String query,
}) async {
  List<String> suggestions =
      await youtubeExplode.search.getQuerySuggestions(query);
  Map jsonDataVideo = {
    "@type": "youtubeSearchSuggestions",
    "count": suggestions.length,
    "suggestions": suggestions,
  };

  return googleapis_client_scheme.YoutubeSearchSuggestions(jsonDataVideo);
}