An introduction to Navigator 2.0
Navigator 2.0 is a declarative navigation API that allows us complete control over our application’s navigation stack. This also allows us to control routes much like any other state of our application.
The Navigator 2.0 API adds new classes to the framework in order to make the app’s screens a function of the app state. This also provides the ability to parse routes from the underlying platform (such as web URLs). Navigator 2.0 is provided alongside the existing navigator. That means Navigator 2.0 is not a replacement for the existing imperative navigation API; it’s just another way of handling our app’s navigation. It was introduced because with Flutter being a cross-platform framework, the imperative navigation API (which is more suitable for mobile-only applications) was limiting the progress of Flutter on the web. Navigator 2.0 is more suitable for platforms such as applications on the web, where underlying platform...