Navigation in Flutter - the not-so-obvious parts
summary
Walks through Navigator 1.0 imperative patterns that break on web — address bar not updating and broken back/forward — then shows migrating to Navigator 2.0 with go_router to get proper URLs and working browser buttons. Demonstrates child routes to restore the app bar back button, and using go_router_builder to generate type-safe generated routes so required path and query params cannot be forgotten. Mentions shell routes and auto_route as alternatives and shows the generated approach actually working end to end.
AI-written summary · about
chapters (12)
- 0:00Flutter navigation basics
- 1:53Imperative navigation repetition
- 3:59Named navigation limits
- 5:47Route map and browser issues
- 7:33Declarative navigation Go Router
- 9:47Go Router naive problems
- 10:54Child routes back support
- 12:20Path and query parameters
- 14:57Type safety Go Router Builder
- 17:55Honorable mentions
- 19:20Choosing navigation approach
- 20:03Closing
related talks
47mFlutter Navigation 2.0 in Real Life
49mNavigation Component, feedback from the trench
26mVoyager: Navigation and DI for Flutter
19mA humble approach to Flutter app architecture
41mSwiftUI Tutorial 2024: Master Navigation - NavigationStack, NavigationPath & NavigationDestination
43mOh, the places you’ll go! — Android Navigation: How Does It Work & What’s New
41mThe future of routing with the Navigation API
05mLightning talk from Eric Vlad Vicenti
