RenderConstrainedBox constructor Null safety

RenderConstrainedBox(
  1. {RenderBox? child,
  2. required BoxConstraints additionalConstraints}
)

Creates a render box that constrains its child.

The additionalConstraints argument must not be null and must be valid.

Implementation

RenderConstrainedBox({
  RenderBox? child,
  required BoxConstraints additionalConstraints,
}) : assert(additionalConstraints != null),
     assert(additionalConstraints.debugAssertIsValid()),
     _additionalConstraints = additionalConstraints,
     super(child);