LimitedBoxModifier constructor

const LimitedBoxModifier({
  1. Key? key,
  2. Widget? child,
  3. Key? modifierKey,
  4. double maxWidth = double.infinity,
  5. double maxHeight = double.infinity,
})

Creates a box that limits its size only when it's unconstrained.

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

Implementation

const LimitedBoxModifier({
  super.key,
  super.child,
  super.modifierKey,
  this.maxWidth = double.infinity,
  this.maxHeight = double.infinity,
})  : assert(maxWidth >= 0.0),
      assert(maxHeight >= 0.0);