maxUnconstrained method Null safety

BoxConstraints maxUnconstrained(
  1. BoxConstraints constraints
)

A BoxConstraintsTransform that removes both the maxWidth and the maxHeight constraints from the input.

Setting constraintsTransform to this allows child to render at least its "natural" size, and grow along an axis if the incoming BoxConstraints has a larger minimum constraint on that axis.

Implementation

static BoxConstraints maxUnconstrained(BoxConstraints constraints) => constraints.copyWith(maxWidth: double.infinity, maxHeight: double.infinity);