maxWidthUnconstrained method Null safety

BoxConstraints maxWidthUnconstrained(
  1. BoxConstraints constraints
)

A BoxConstraintsTransform that removes the maxWidth constraint from the input.

Setting constraintsTransform to this allows child to render at its "natural" width or the minWidth of the incoming BoxConstraints, whichever is larger.

Implementation

static BoxConstraints maxWidthUnconstrained(BoxConstraints constraints) => constraints.copyWith(maxWidth: double.infinity);