screenSize property

ScreenSize get screenSize

screenSize

represent the screen size enumeration while it based on screen width rather than device with sometime user rotate the device, then its screen width will be changed too

Implementation

ScreenSize get screenSize {
  final double width = screenWidth;
  if (width < LayoutBreakPoint.kXsBreakPoint) {
    return ScreenSize.xs;
  } else if (LayoutBreakPoint.kXsBreakPoint <= width &&
      width < LayoutBreakPoint.kSmBreakPoint) {
    return ScreenSize.sm;
  } else if (LayoutBreakPoint.kSmBreakPoint <= width &&
      width < LayoutBreakPoint.kMdBreakPoint) {
    return ScreenSize.md;
  } else if (LayoutBreakPoint.kMdBreakPoint <= width &&
      width < LayoutBreakPoint.kLgBreakPoint) {
    return ScreenSize.lg;
  } else if (LayoutBreakPoint.kLgBreakPoint <= width &&
      width < LayoutBreakPoint.kGlBreakPoint) {
    return ScreenSize.xl;
  } else if (LayoutBreakPoint.kGlBreakPoint <= width &&
      width < LayoutBreakPoint.kRlBreakPoint) {
    return ScreenSize.gl;
  } else {
    return ScreenSize.rl;
  }
}