responsiveWidth function

double responsiveWidth(
  1. double screenWidth, {
  2. double mobile = 0.9,
  3. double medium = 0.9,
  4. double large = 0.5,
})

Implementation

double responsiveWidth(
  double screenWidth, {
  double mobile = 0.9,
  double medium = 0.9,
  double large = 0.5,
}) {
  if (screenWidth <= narrowScreenWidthThreshold) return screenWidth * mobile;
  if (screenWidth <= mediumWidthBreakpoint) return screenWidth * medium;
  return screenWidth * large;
}