This approach is broadly applicable. In Flutter, basic types like
Color and Shape can be interpolated, but so can much more elaborate
types such as Decoration, TextStyle, or Theme. These are
typically constructed from components that can themselves be interpolated,
and interpolating the more complicated objects is often as simple as
recursively interpolating all the values that describe the complicated
objects.

This allows the class hierarchy to be arbitrarily extended, with later
additions being able to interpolate between previously-known values
and themselves.

In some cases, the interpolation itself cannot be described by any of
the available classes, and a private class is defined to describe the
intermediate stage. This is the case, for instance, when interpolating
between a CircleBorder and a RoundedRectangleBorder.