unconstrained method Null safety

BoxConstraints unconstrained(
  1. BoxConstraints constraints

A BoxConstraintsTransform that always returns a BoxConstraints that imposes no constraints on either dimension (i.e. const BoxConstraints()).

Setting constraintsTransform to this allows child to render at its "natural" size (equivalent to an UnconstrainedBox with constrainedAxis set to null).


static BoxConstraints unconstrained(BoxConstraints constraints) => const BoxConstraints();