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