Key information:

The Inkwell captures the tap gesture.
The calling function passes the onTap() function to the
Photo’s constructor.

During flight, the InkWell draws its splash on its first
Material ancestor.

The Material widget has a slightly opaque color, so the
transparent portions of the image are rendered with color.
This ensures that the circle-to-square transition is easy to see,
even for images with transparency.

The Photo class does not include the Hero in its widget tree.
For the animation to work, the hero
wraps the RadialExpansion widget.

RadialExpansion class

The RadialExpansion widget, the core of the demo, builds the
widget tree that clips the image during the transition.
The clipped shape results from the intersection of a circular clip
(that grows during flight),
with a rectangular clip (that remains a constant size throughout).

To do this, it builds the following widget tree: