orientation static method

Orientation orientation(
  1. BuildContext context
)

Tells you the current orientation of the device

Implementation

static Orientation orientation(BuildContext context) {
  return (h(context) > w(context))
      ? Orientation.portrait
      : Orientation.landscape;
}