getFontRatio method
Implementation
double getFontRatio(double val) {
if (screenWidth >= 1200 ||
(Platform.isLinux || Platform.isMacOS || Platform.isWindows)) {
return val;
}
double res = (val / refWidth) * 100;
double temp = 0.0;
if (screenWidth < screenHeight) {
temp = res * safeBlockHorizontal * textFactor;
} else {
temp = res * safeBlockVertical * textFactor;
}
// print('$val,$temp,$refHeight,$refWidth');
return temp;
}