Skip to content

Commit

Permalink
add sizing extension members to num class
Browse files Browse the repository at this point in the history
  • Loading branch information
Hosam Hasan committed Mar 2, 2020
1 parent 0768c54 commit f3046b3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/size_extension.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import 'flutter_screenutil.dart';

extension SizeExtension on num {
num get w => ScreenUtil().setWidth(this);

num get h => ScreenUtil().setHeight(this);

num get sp => ScreenUtil().setSp(this);

num get ssp => ScreenUtil().setSp(this, allowFontScalingSelf: true);
}

0 comments on commit f3046b3

Please sign in to comment.