orientate method

Size orientate(
  1. NativeDeviceOrientation orientation
)

Returns the size with width and height swapped if orientation is portrait.

Implementation

Size orientate(NativeDeviceOrientation orientation) {
  if (orientation.isLandscape()) {
    return Size(width, height);
  } else {
    return Size(height, width);
  }
}