← Flutter & Dart learning path
Flutter & Dart · Module 6 of 10

Navigation and routing

Move between screens and pass data.

📖 Key ideas

  1. Navigator.push(context, MaterialPageRoute(builder: (_) => Detail()));
  2. Navigator.pop(context, result) goes back with data.
  3. Named routes or the go_router package for URLs and deep links.
  4. Pass data through constructors.
  5. BottomNavigationBar and Drawer for app sections.
💡 Real-life example: Navigator is a stack of plates: push adds a screen on top, pop removes it.
NavigatorManages a stack of screens
pushOpens a new screen
popReturns to previous screen
go_routerDeclarative routing package