copyWithAxis method
Creates a copy of this box constraints but with the given fields replaced with the new values.
Implementation
BoxConstraints copyWithAxis(
Axis axis, {
double? minCross,
double? maxCross,
double? minMain,
double? maxMain,
}) {
return axis == Axis.vertical
? copyWith(
minWidth: minCross,
maxWidth: maxCross,
minHeight: minMain,
maxHeight: maxMain,
)
: copyWith(
minWidth: minMain,
maxWidth: maxMain,
minHeight: minCross,
maxHeight: maxCross,
);
}