Cinemapedia uses GoRouter for declarative, URL-based navigation. All routes are defined in a singleDocumentation 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.
appRouter instance and wired into MaterialApp.router.
Router setup
lib/config/router/app_router.dart
initialLocation
The router opens on/ (the home screen) when the app launches. Change initialLocation to send users to a different screen on first load.
Configured routes
| Path | Name | Screen | Description |
|---|---|---|---|
/ | HomeScreen.name | HomeScreen | Landing screen — lists movies currently in theatres |
/movie/:id | MovieScreen.name | MovieScreen | Detail view for a single movie identified by :id |
Nested routes
The movie detail route is declared as a child of the home route, not as a top-level entry:/— home/movie/550— detail page for movie with id550
Child paths do not start with a leading
/. GoRouter joins the parent path and the child path for you, so '/' + 'movie/:id' becomes /movie/:id.Path parameters
The:id segment is a dynamic path parameter. GoRouter extracts it from the URL and makes it available via state.pathParameters:
movieId falls back to 'no-id' so the build never receives a null value.
Navigating between screens
Use the named-route helpers anywhere in the widget tree:Wiring the router to the app
TheappRouter instance is passed to MaterialApp.router in main.dart:
lib/main.dart
MaterialApp.router instead of MaterialApp hands full navigation control to GoRouter, enabling deep linking and URL-driven navigation on web and mobile alike.