Showing
1 changed file
with
6 additions
and
3 deletions
@@ -116,9 +116,12 @@ class ScreenUtil { | @@ -116,9 +116,12 @@ class ScreenUtil { | ||
116 | ///Font size adaptation method | 116 | ///Font size adaptation method |
117 | ///- [fontSize] The size of the font on the UI design, in px. | 117 | ///- [fontSize] The size of the font on the UI design, in px. |
118 | ///- [allowFontScaling] | 118 | ///- [allowFontScaling] |
119 | - double setSp(num fontSize, {bool allowFontScalingSelf}) => allowFontScalingSelf == null | ||
120 | - ? (allowFontScaling ? (fontSize * scaleText) : ((fontSize * scaleText) / _textScaleFactor)) | 119 | + double setSp(num fontSize, {bool allowFontScalingSelf}) => |
120 | + allowFontScalingSelf == null | ||
121 | + ? (allowFontScaling | ||
122 | + ? (fontSize * scaleText) | ||
123 | + : (fontSize * scaleText / _textScaleFactor)) | ||
121 | : (allowFontScalingSelf | 124 | : (allowFontScalingSelf |
122 | ? (fontSize * scaleText) | 125 | ? (fontSize * scaleText) |
123 | - : ((fontSize * scaleText) / _textScaleFactor)); | 126 | + : (fontSize * scaleText / _textScaleFactor)); |
124 | } | 127 | } |
-
Please register or login to post a comment