AnimatedFractionallySizedBox constructor Null safety

const AnimatedFractionallySizedBox(
  1. {Key? key,
  2. AlignmentGeometry alignment = Alignment.center,
  3. Widget? child,
  4. double? heightFactor,
  5. double? widthFactor,
  6. Curve curve = Curves.linear,
  7. required Duration duration,
  8. VoidCallback? onEnd}
)

Creates a widget that sizes its child to a fraction of the total available space that animates implicitly, and positions its child by an alignment that animates implicitly.

The curve and duration argument must not be null If non-null, the widthFactor and heightFactor arguments must be non-negative.

Implementation

const AnimatedFractionallySizedBox({
  super.key,
  this.alignment = Alignment.center,
  this.child,
  this.heightFactor,
  this.widthFactor,
  super.curve,
  required super.duration,
  super.onEnd,
}) : assert(alignment != null),
     assert(widthFactor == null || widthFactor >= 0.0),
     assert(heightFactor == null || heightFactor >= 0.0);