constrainCrossAxis method
Returns the value that both satisfies the constraints and is as close as
possible to the given extent crossing axis
.
Implementation
double constrainCrossAxis(Axis axis, [double extent = double.infinity]) {
return axis == Axis.vertical ?
constrainWidth(extent) :
constrainHeight(extent);
}