Key information:

The hero wraps the RadialExpansion widget.

As the hero flies, its size changes and,
because it constrains its child’s size,
the RadialExpansion widget changes size to match.

The RadialExpansion animation is created by two overlapping clips.

The example defines the tweening interpolation using
MaterialRectCenterArcTween.
The default flight path for a hero animation
interpolates the tweens using the corners of the heroes.
This approach affects the hero’s aspect ratio during
the radial transformation, so the new flight path uses
MaterialRectCenterArcTween to interpolate the tweens using the
center point of each hero.

    Here’s the code:

    static RectTween _createRectTween(Rect begin, Rect end) {
  return MaterialRectCenterArcTween(begin: begin, end: end);
}