Animate a widget across screens

Navigate with named routes

Navigate to a new screen and back

Cookbook

Navigation

Navigate to a new screen and back

1. Create two routes

2. Navigate to the second route using Navigator.push()

3. Return to the first route using Navigator.pop()

Interactive example

Most apps contain several screens for displaying different types of
information.
For example, an app might have a screen that displays products.
When the user taps the image of a product, a new screen displays
details about the product.

Terminology: In Flutter, screens and pages are called routes.
  The remainder of this recipe refers to routes.

In Android, a route is equivalent to an Activity.
In iOS, a route is equivalent to a ViewController.
In Flutter, a route is just a widget.