isLandscape static method

bool isLandscape(
  1. BuildContext context
)

It tells you if the orientation of the screen is in portrait mode so you don't have to put the condition (orientation(context) == Orientation.landscape) ? true : false

Implementation

static bool isLandscape(BuildContext context) {
  return (orientation(context) == Orientation.landscape) ? true : false;
}