Rotates this size with axis where width becomes the cross axis extent and height becomes the main axis extent.
axis
width
height
Size rotateWithAxis(Axis axis) { return axis == Axis.vertical ? this : Size(height, width); }