Cinemapedia displays movies in five distinct categories, each backed by a dedicated Riverpod provider and a separate TheMovieDB API endpoint. All categories share the sameDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/juuaaann456/DMI-Practica06/llms.txt
Use this file to discover all available pages before exploring further.
MoviesNotifier class and support infinite scroll pagination.
Categories overview
En cines
Movies currently playing in theaters. Uses the
/movie/now_playing endpoint. Provider: nowPlayingMoviesProvider.Próximamente
Upcoming releases. Uses the
/movie/upcoming endpoint. Provider: upcomingMoviesProvider.Populares
Most popular movies right now. Uses the
/movie/popular endpoint. Provider: popularMoviesProvider.Mejor valoradas
Highest rated movies of all time. Uses the
/movie/top_rated endpoint. Provider: topratedMoviesProvider.Cine Mexicano
Mexican cinema, sorted by rating. Uses the
/discover/movie endpoint with region=MX and with_origin_country=MX. Provider: mexicanMoviesProvider.Category reference table
| Display name | Provider | TheMovieDB endpoint | Notes |
|---|---|---|---|
| En cines | nowPlayingMoviesProvider | GET /movie/now_playing | Also drives the MovieSlideshow (first 6 results) |
| Próximamente | upcomingMoviesProvider | GET /movie/upcoming | — |
| Populares | popularMoviesProvider | GET /movie/popular | — |
| Mejor valoradas | topratedMoviesProvider | GET /movie/top_rated | — |
| Cine Mexicano | mexicanMoviesProvider | GET /discover/movie | Filtered by region=MX, with_origin_country=MX, sorted by vote_average.desc, minimum 10 votes |
API datasource
All HTTP requests are made byMoviedbDataSource using the dio package. The base URL is https://api.themoviedb.org/3 with language=es-MX applied globally.
Standard categories
For Now Playing, Popular, Upcoming, and Top Rated, the pattern is identical — only the path differs:Movies without a poster image are filtered out before the list is returned. This prevents broken image widgets in the UI.
Mexican Cinema
ThegetMexicanMovies method uses the /discover/movie endpoint with additional query parameters:
Providers
Each category has its ownNotifierProvider<MoviesNotifier, List<Movie>>. All five providers are defined in movies_providers.dart and follow the same pattern:
MoviesNotifier reusable across all five categories.
Infinite pagination
Pagination is handled entirely byMoviesNotifier. Calling loadNextPage() increments an internal page counter and appends the new results to the existing state list.
Scroll-triggered loading
MovieHorizontalListview attaches a ScrollController listener that calls loadNextPage() when the scroll position is within 200 pixels of the end of the list:
HomeScreen for each category: