rotateWithAxis method

Size rotateWithAxis(
  1. Axis axis
)

Rotates this size with axis where width becomes the cross axis extent and height becomes the main axis extent.

Implementation

Size rotateWithAxis(Axis axis) {
  return axis == Axis.vertical ? this : Size(height, width);
}