sizeWidth static method

double sizeWidth(
  1. double mobileSize,
  2. double tabletSize,
  3. double tabletLandscapeSize,
  4. BuildContext context,
)

Implementation

static double sizeWidth(double mobileSize, double tabletSize,
    double tabletLandscapeSize, BuildContext context) {
  var width = MediaQuery.of(context).size.width;
  if (MediaQuery.of(context).orientation == Orientation.landscape) {
    return tabletLandscapeSize * width;
  }
  if (isTablet(context)) {
    return tabletSize * width;
  }

  return mobileSize * width;
}