isLandscape static method

bool isLandscape({
  1. required BuildContext context,
})

checks if a devices orientation is in landscape mode

Implementation

static bool isLandscape({required BuildContext context}) {
  if (MediaQuery.of(context).orientation == Orientation.landscape) {
    return true;
  } else {
    return false;
  }
}