activeWindowSize property

WindowSize activeWindowSize

Implementation

static WindowSize get activeWindowSize {
  double maxMobileWidth = 599;
  double maxTabletWidth = 839;
  if ((orientation == Orientation.portrait && width <= maxMobileWidth) ||
      (orientation == Orientation.landscape && height <= maxMobileWidth)) {
    return WindowSize.compact;
  } else if ((orientation == Orientation.portrait &&
          width <= maxTabletWidth) ||
      (orientation == Orientation.landscape && height <= maxTabletWidth)) {
    return WindowSize.medium;
  } else {
    return WindowSize.expanded;
  }
}