Showing
1 changed file
with
11 additions
and
0 deletions
lib/size_extension.dart
0 → 100644
| 1 | +import 'flutter_screenutil.dart'; | ||
| 2 | + | ||
| 3 | +extension SizeExtension on num { | ||
| 4 | + num get w => ScreenUtil().setWidth(this); | ||
| 5 | + | ||
| 6 | + num get h => ScreenUtil().setHeight(this); | ||
| 7 | + | ||
| 8 | + num get sp => ScreenUtil().setSp(this); | ||
| 9 | + | ||
| 10 | + num get ssp => ScreenUtil().setSp(this, allowFontScalingSelf: true); | ||
| 11 | +} |
-
Please register or login to post a comment