tightForFinite static method
Creates box constraints that require the given cross or main size, except if they are infinite.
See also:
axisTightFor
, which is similar but instead of being tight if the value is not infinite, is tight if the value is non-null.
Implementation
static BoxConstraints tightForFinite(Axis axis, {
double cross = double.infinity,
double main = double.infinity,
}) {
return axis == Axis.vertical ?
BoxConstraints.tightForFinite(width: cross, height: main) :
BoxConstraints.tightForFinite(width: main, height: cross);
}