RenderFractionallySizedOverflowBox constructor Null safety

RenderFractionallySizedOverflowBox(
  1. {RenderBox? child,
  2. double? widthFactor,
  3. double? heightFactor,
  4. AlignmentGeometry alignment = Alignment.center,
  5. TextDirection? textDirection}
)

Creates a render box that sizes its child to a fraction of the total available space.

If non-null, the widthFactor and heightFactor arguments must be non-negative.

The alignment must not be null.

The textDirection must be non-null if the alignment is direction-sensitive.

Implementation

RenderFractionallySizedOverflowBox({
  super.child,
  double? widthFactor,
  double? heightFactor,
  super.alignment,
  super.textDirection,
}) : _widthFactor = widthFactor,
     _heightFactor = heightFactor {
  assert(_widthFactor == null || _widthFactor! >= 0.0);
  assert(_heightFactor == null || _heightFactor! >= 0.0);
}