rotateWithAxis method

Offset rotateWithAxis(
  1. Axis axis
)

Rotates this offset with axis where dx becomes the cross axis extent and dy becomes the main axis extent.

Implementation

Offset rotateWithAxis(Axis axis) {
  return axis == Axis.vertical ? this : Offset(dy, dx);
}