searchMovies method
- String query
Searches for movies matching the given query.
Implementation
Future<List<Movie>> searchMovies(String query) async {
final results = await _client
.getJsonList('search/movie?query=${Uri.encodeComponent(query)}');
return results.map((movie) => Movie.fromJson(movie)).toList();
}