DSIDrawerheightWidth function
dynamic
DSIDrawerheightWidth(
- dynamic context,
- dynamic percentage,
- dynamic isHeight
Implementation
DSIDrawerheightWidth(context, percentage, isHeight) {
double raw;
if (isHeight) {
raw = MediaQuery.of(context).size.height;
double res = percentage * raw / 100;
return res - 80;
} else {
raw = MediaQuery.of(context).size.width - 140;
double res = percentage * raw / 100;
return res;
}
return 0;
}