getOrientation static method

Orientation getOrientation(
  1. double width,
  2. double height
)

Gets the current orientation.

Implementation

static Orientation getOrientation(double width, double height) {
  return width > height ? Orientation.landscape : Orientation.portrait;
}