flipAxis function
- Axis direction
Returns the opposite of the given Axis.
Specifically, returns Axis.horizontal for Axis.vertical, and vice versa.
See also:
- flipAxisDirection, which does the same thing for AxisDirection values.
Implementation
Axis flipAxis(Axis direction) {
return switch (direction) {
Axis.horizontal => Axis.vertical,
Axis.vertical => Axis.horizontal,
};
}