Summary
In this chapter, we have explored the concept of screens within an app and seen how to add navigation between them. First, we got to know the Navigator
widget, the main player when it comes to navigation in Flutter. We have seen how it composes the navigation stack or history by using the Overlay
class.
We have also seen another important piece of navigation, Route
, and how to define it for use in our applications. We checked out different approaches to implement the navigation, with the most typical way being with the MaterialPageRoute
widget.
We also explored the new Navigator 2.0 approach to get a feel for how this declarative approach to screen management contrasts with the Navigator 1.0 imperative approach.
Finally, we briefly explored app state management and some of the common approaches. This is a rich area that you should explore when you become more confident with Dart and Flutter.
In the next chapter, we start to look at another part of the framework...