isPortrait method
Checks if device is in portrait mode or portrait is enforced
Implementation
@protected
bool isPortrait(BuildContext context, bool portraitOnly) {
return MediaQuery.of(context).orientation == Orientation.portrait ||
portraitOnly;
}