matchesQualifier static method

bool matchesQualifier(
  1. DpQualifier type,
  2. num value
)

Implementation

static bool matchesQualifier(DpQualifier type, num value) {
  final m = AppDimensScope.metricsOrDefault;
  final metric = switch (type) {
    DpQualifier.smallWidth => m.smallestWidthDp,
    DpQualifier.width => m.screenWidthDp.toDouble(),
    DpQualifier.height => m.screenHeightDp.toDouble(),
  };
  return metric >= value.toDouble();
}