RenderLimitedBox constructor

RenderLimitedBox({
  1. RenderBox? child,
  2. double maxWidth = double.infinity,
  3. double maxHeight = double.infinity,
})

Creates a render box that imposes a maximum width or maximum height on its child if the child is otherwise unconstrained.

The maxWidth and maxHeight arguments not be null and must be non-negative.

Implementation

RenderLimitedBox({
  RenderBox? child,
  double maxWidth = double.infinity,
  double maxHeight = double.infinity,
}) : assert(maxWidth >= 0.0),
     assert(maxHeight >= 0.0),
     _maxWidth = maxWidth,
     _maxHeight = maxHeight,
     super(child);