double getHeightRatio(double val) { if (screenWidth! >= 1200) { return val; } double res = (val / refHeight) * 100; double temp = res * blockSizeVertical; return temp; }