isPortrait static method

bool isPortrait(
  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.portrait) ? true : false

Implementation

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