Function getOppositeDirection

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"); // -> null
getOppositeDirection("ambiguous"); // -> null

LisnUsageError If the given view is not valid.