To work with named routes,
use the Navigator.pushNamed() function.
This example replicates the functionality from the original recipe,
demonstrating how to use named routes using the following steps:

Create two screens.

Define the routes.

Navigate to the second screen using Navigator.pushNamed().

Return to the first screen using Navigator.pop().

1. Create two screens

First, create two screens to work with. The first screen contains a
button that navigates to the second screen. The second screen contains a
button that navigates back to the first.

2. Define the routes

Next, define the routes by providing additional properties
to the MaterialApp constructor: the initialRoute
and the routes themselves.

The initialRoute property defines which route the app should start with.
The routes property defines the available named routes and the widgets
to build when navigating to those routes.