isLandscape static method

bool isLandscape([
  1. BuildContext? context
])

Implementation

static bool isLandscape([BuildContext? context]) {
  if (context != null) {
    return MediaQuery.of(context).orientation == Orientation.landscape;
  }
  return MediaQueryData.fromWindow(window).orientation ==
      Orientation.landscape;
}