The destination hero appears in its final position
in the destination route.

The source hero is restored to its route.

Popping the route performs the same process,
animating the hero back to its size
and location in the source route.

Essential classes

The examples in this guide use the following classes to
implement hero animations:

Hero

The widget that flies from the source to the destination route.
Define one Hero for the source route and another for the
destination route, and assign each the same tag.
Flutter animates pairs of heroes with matching tags.

Inkwell

Specifies what happens when tapping the hero.
The InkWell’s onTap() method builds the
new route and pushes it to the Navigator’s stack.

Navigator

The Navigator manages a stack of routes. Pushing a route on or
popping a route from the Navigator’s stack triggers the animation.