RenderFittedBox constructor Null safety

RenderFittedBox(
  1. {BoxFit fit = BoxFit.contain,
  2. AlignmentGeometry alignment = Alignment.center,
  3. TextDirection? textDirection,
  4. RenderBox? child,
  5. Clip clipBehavior = Clip.none}
)

Scales and positions its child within itself.

The fit and alignment arguments must not be null.

Implementation

RenderFittedBox({
  BoxFit fit = BoxFit.contain,
  AlignmentGeometry alignment = Alignment.center,
  TextDirection? textDirection,
  RenderBox? child,
  Clip clipBehavior = Clip.none,
}) : assert(fit != null),
     assert(alignment != null),
     assert(clipBehavior != null),
     _fit = fit,
     _alignment = alignment,
     _textDirection = textDirection,
     _clipBehavior = clipBehavior,
     super(child);