← Flutter & Dart learning pathFlutter & Dart · Module 6 of 10
Navigation and routing
Move between screens and pass data.
📖 Key ideas
- Navigator.push(context, MaterialPageRoute(builder: (_) => Detail()));
- Navigator.pop(context, result) goes back with data.
- Named routes or the go_router package for URLs and deep links.
- Pass data through constructors.
- 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