ConstrainedBox constructor Null safety

ConstrainedBox(
  1. {Key? key,
  2. required BoxConstraints constraints,
  3. Widget? child}
)

Creates a widget that imposes additional constraints on its child.

The constraints argument must not be null.

Implementation

ConstrainedBox({
  super.key,
  required this.constraints,
  super.child,
}) : assert(constraints != null),
     assert(constraints.debugAssertIsValid());