axisConstraints method
Returns box constraints with the same axis
constraints but with
an unconstrained cross axis.
Implementation
BoxConstraints axisConstraints(Axis axis) {
return axis == Axis.vertical ? heightConstraints() : widthConstraints();
}