Many apps have a navigator near the top of their widget hierarchy in orderto display their logical history using an Overlay with the most recentlyvisited pages visually on top of the older pages. Using this pattern letsthe navigator visually transition from one page to another by moving the widgetsaround in the overlay. Similarly, the navigator can be used to show a dialogby positioning the dialog widget above the current page.
Mobile apps typically reveal their contents via full-screen elementscalled "screens" or "pages". In Flutter these elements are calledroutes and they're managed by a Navigator widget. The navigatormanages a stack of Route objects and provides two ways for managingthe stack, the declarative API Navigator.pages or imperative APINavigator.push and Navigator.pop.
Although you can create a navigator directly, it's most common to use thenavigator created by the Router which itself is created and configured bya WidgetsApp or a MaterialApp widget. You can refer to that navigatorwith Navigator.of.
The MaterialApp can be createdwith a Map which maps from a route's name toa builder function that will create it. The MaterialApp uses thismap to create a value for its navigator's onGenerateRoute callback.
08ab062aa8