Returns the opposite direction to the given direction or null if the given direction has no opposite.
getOppositeDirection("up"); // -> "down"getOppositeDirection("down"); // -> "up"getOppositeDirection("left"); // -> "right"getOppositeDirection("right"); // -> "left"getOppositeDirection("none"); // -> nullgetOppositeDirection("ambiguous"); // -> null Copy
getOppositeDirection("up"); // -> "down"getOppositeDirection("down"); // -> "up"getOppositeDirection("left"); // -> "right"getOppositeDirection("right"); // -> "left"getOppositeDirection("none"); // -> nullgetOppositeDirection("ambiguous"); // -> null
LisnUsageError If the given view is not valid.
Returns the opposite direction to the given direction or null if the given direction has no opposite.
Example
Throws
LisnUsageError If the given view is not valid.