offsetFromDirection function

Offset offsetFromDirection(
  1. AxisDirection axisDirection
)

////////////////////////// ////Transition////////////

Implementation

///////Transition////////////
Offset offsetFromDirection(AxisDirection axisDirection) {
  switch (axisDirection) {
    case AxisDirection.up:
      return const Offset(0.0, 1.0);
    case AxisDirection.right:
      return const Offset(1.0, 0.0);
    case AxisDirection.down:
      return const Offset(0.0, -1.0);
    case AxisDirection.left:
      return const Offset(-1.0, 0.0);
  }
}