double scaledOptimumWidth(double value){ final initialValue = value; final scaleRatio = initialValue/optimumWidth!; final scaledValue = _currentWidth! * scaleRatio; return scaledValue; }