build method
- BuildContext context
override
Override this method to build widgets that depend on the state of the listenable (e.g., the current value of the animation).
Implementation
@override
Widget build(BuildContext context) {
return ClipRect(
child: Align(
alignment:
alignment ??
switch (axis) {
Axis.horizontal => AlignmentDirectional(axisAlignment ?? 0.0, -1.0),
Axis.vertical => AlignmentDirectional(-1.0, axisAlignment ?? 0.0),
},
heightFactor: axis == Axis.vertical
? math.max(sizeFactor.value, 0.0)
: fixedCrossAxisSizeFactor,
widthFactor: axis == Axis.horizontal
? math.max(sizeFactor.value, 0.0)
: fixedCrossAxisSizeFactor,
child: child,
),
);
}