sizeTransition method
Animates its own size and clips and aligns its child.
SizeTransition acts as a ClipRect that animates either its width or its height, depending upon the value of axis. The alignment of the child along the axis is specified by the axisAlignment.
Like most widgets, SizeTransition will conform to the constraints it is given, so be sure to put it in a context where it can change size. For instance, if you place it into a Container with a fixed size, then the SizeTransition will not be able to change size, and will appear to do nothing.
Implementation
Widget sizeTransition({
required Animation<double> sizeFactor,
Key? key,
Axis axis = Axis.vertical,
double axisAlignment = 0.0,
}) {
return SizeTransition(
key: key,
sizeFactor: sizeFactor,
axis: axis,
axisAlignment: axisAlignment,
child: this,
);
}