width static method

double width(
  1. double p,
  2. BuildContext context
)

this is for the width if the device is tablet then the any widget width size is reduced at 60%

Implementation

static double width(double p, BuildContext context) {
  bool isMobile = checkDeviceTabOrMobile(context);
  if(!isMobile){
    return MediaQuery.of(context).size.width * (p * 0.6 / 100);
  }
  return MediaQuery.of(context).size.width * (p / 100);
}