Merge branch 'master' of https://github.com/OpenFlutter/flutter_screenutil
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Showing
1 changed file
with
5 additions
and
0 deletions
@@ -13,6 +13,11 @@ extension SizeExtension on num { | @@ -13,6 +13,11 @@ extension SizeExtension on num { | ||
13 | ///[ScreenUtil.setSp] | 13 | ///[ScreenUtil.setSp] |
14 | double get sp => ScreenUtil().setSp(this); | 14 | double get sp => ScreenUtil().setSp(this); |
15 | 15 | ||
16 | + ///smart size : it check your value if it is bigger than your value set your value | ||
17 | + ///for example you have set 16.sm() , if for your screen 16.sp() bigger than 16 it will set 16 not 16.sp() | ||
18 | + ///I think that it is good for save size balance on big sizes of screen | ||
19 | + double get sm => min(toDouble(), sp); | ||
20 | + | ||
16 | ///[ScreenUtil.setSp] | 21 | ///[ScreenUtil.setSp] |
17 | @Deprecated('please use [sp]') | 22 | @Deprecated('please use [sp]') |
18 | double get ssp => ScreenUtil().setSp(this); | 23 | double get ssp => ScreenUtil().setSp(this); |
-
Please register or login to post a comment