Navigation and routing
Move between screens, return results and choose an appropriate routing model.
This chapter covers navigation and routing through specific problems and worked examples. Read the lesson descriptions before choosing a starting point. Complete runnable examples are labelled; project configuration and code fragments explain where they belong.
Your lessons
One clear step at a time- 01Flutter Navigator push and pop with two screensOpen a second screen with MaterialPageRoute, use the route stack and let the platform back action return to the previous screen.2 min
- 02Return a result from a Flutter screen safelyPass typed inputs to a destination and await a nullable result without using a stale BuildContext after navigation.2 min
- 03Flutter routing and deep links with go_routerModel a screen as a route with stable parameters and understand direct navigation, unknown IDs and browser history.2 min