byWidth2<T> static method

T byWidth2<T>(
  1. dynamic context,
  2. T size, [
  3. T? computerSmall2,
  4. T? computerSmall,
  5. T? largeTablet,
  6. T? tablet,
  7. T? phone,
  8. T? tiny,
])

Implementation

static T byWidth2<T>(context, T size,
    [T? computerSmall2,
    T? computerSmall,
    T? largeTablet,
    T? tablet,
    T? phone,
    T? tiny]) {
  if (isComputerSmall2(context)) return computerSmall2 ?? size;
  if (isComputerSmall(context)) return computerSmall ?? size;
  if (isComputer(context)) return size;
  if (isLargeTablet(context)) return largeTablet ?? size;
  if (isTablet(context)) return tablet ?? size;
  if (isPhone(context)) return phone ?? size;
  if (isTinyLimit(context)) return tiny ?? size;
  return size;
}