ConstrainedBox({Key key, @required BoxConstraints constraints, Widget child })

Creates a widget that imposes additional constraints on its child.

The constraints argument must not be null.

Source

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