customWidthHeight method
dynamic
customWidthHeight()
Implementation
customWidthHeight(
double screenWidth,
double screenHeight,
Function(double width, double height) onWidthHeight,
) {
double tempWidth = ((screenWidth - 80) / 1.5).toDouble();
if (tempWidth > 225) {
tempWidth = 225;
}
if (tempWidth < 175) {
tempWidth = 175;
}
double tempHeight = ((screenHeight - 100) / 5).toDouble();
if (tempHeight > 70) {
tempHeight = 75;
}
if (tempHeight < 40) {
tempHeight = 40;
}
onWidthHeight(tempWidth, tempHeight);
}