sizeWidth static method
double
sizeWidth(
- double mobileSize,
- double tabletSize,
- double tabletLandscapeSize,
- 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;
}