setSp method
Set font size based on design draft
fontSize - Font size from design draft
allowFontScaling - Whether to respect system font scaling
Returns proportional font size for current device
Implementation
double setSp(
num fontSize, {
bool allowFontScaling = ScreenUtil.allowFontScaling,
}) {
final scaledFontSize = fontSize * scaleText;
if (!allowFontScaling) return scaledFontSize;
return _textScaleFactor.scale(scaledFontSize);
}