setSp method

double setSp(
  1. double fontSize, {
  2. bool? allowFontScalingSelf,
})

FontSize function @param fontSize UI in px. Font size adaptation method @param fontSize The size of the font on the UI design, in px. @param allowFontScaling

Implementation

double setSp(double fontSize, {bool? allowFontScalingSelf}) =>
    allowFontScalingSelf == null
        ? (allowFontScaling
            ? (fontSize * scaleText)
            : ((fontSize * scaleText) / _textScaleFactor))
        : (allowFontScalingSelf
            ? (fontSize * scaleText)
            : ((fontSize * scaleText) / _textScaleFactor));