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