fromScreenCalculator static method

AppLayout fromScreenCalculator(
  1. ScreenCalculator calculator
)

Implementation

static AppLayout fromScreenCalculator(ScreenCalculator calculator) {
  if (CurrentPlatform.isMobile) {
    if (calculator.isVertical) {
      return AppLayout.MOBILE;
    } else {
      return AppLayout.MOBILE_HORIZONTAL;
    }
  }
  if (calculator.isAspectRatioMobile && calculator.isVertical) {
    return AppLayout.NARROW;
  }
  return AppLayout.WIDE;
}