withinAdaptiveConstraint method

bool withinAdaptiveConstraint(
  1. BuildContext context
)

Implementation

bool withinAdaptiveConstraint(BuildContext context) {
  AdaptiveWindowType currentEntry = getWindowType(context);

  switch (currentEntry) {
    case AdaptiveWindowType.xsmall:
      return xsmall;
    case AdaptiveWindowType.small:
      return small;
    case AdaptiveWindowType.medium:
      return medium;
    case AdaptiveWindowType.large:
      return large;
    case AdaptiveWindowType.xlarge:
      return xlarge;
    default:
      throw AssertionError('Unsupported AdaptiveWindowType');
  }
}