3. Add a Hero widget to the second screen

To complete the connection with the first screen,
wrap the Image on the second screen with a Hero
widget that has the same tag as the Hero in the first screen.

After applying the Hero widget to the second screen,
the animation between screens just works.

Note:
  This code is identical to what you have on the first screen.
  As a best practice, create a reusable widget instead of
  repeating code. This example uses identical code for both
  widgets, for simplicity.

Interactive example

Report errors to a service

Navigate to a new screen and back