flipAxisDirection function

AxisDirection flipAxisDirection(
  1. AxisDirection axisDirection

Returns the opposite of the given AxisDirection.

Specifically, returns AxisDirection.up for AxisDirection.down (and vice versa), as well as AxisDirection.left for AxisDirection.right (and vice versa).

See also:


AxisDirection flipAxisDirection(AxisDirection axisDirection) {
  switch (axisDirection) {
    case AxisDirection.up:
      return AxisDirection.down;
    case AxisDirection.right:
      return AxisDirection.left;
    case AxisDirection.down:
      return AxisDirection.up;
    case AxisDirection.left:
      return AxisDirection.right;