Committed by
GitHub
Merge pull request #332 from kageeker/master
Added Vertical and Horizontal Spacing Widget for Columns and Rows
Showing
3 changed files
with
20 additions
and
2 deletions
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # This is a generated file; do not edit or check into version control. | 2 | # This is a generated file; do not edit or check into version control. |
3 | -export "FLUTTER_ROOT=/Users/lizhuoyuan/Development/flutter" | ||
4 | -export "FLUTTER_APPLICATION_PATH=/Users/lizhuoyuan/Development/Project/flutter_screenutil/example" | 3 | +export "FLUTTER_ROOT=C:\dev\flutter" |
4 | +export "FLUTTER_APPLICATION_PATH=C:\Users\kagee\Documents\flutter_screenutil\example" | ||
5 | export "COCOAPODS_PARALLEL_CODE_SIGN=true" | 5 | export "COCOAPODS_PARALLEL_CODE_SIGN=true" |
6 | +<<<<<<< HEAD | ||
7 | +export "FLUTTER_TARGET=lib\main.dart" | ||
8 | +======= | ||
6 | export "FLUTTER_TARGET=/Users/lizhuoyuan/Development/Project/flutter_screenutil/example/lib/main.dart" | 9 | export "FLUTTER_TARGET=/Users/lizhuoyuan/Development/Project/flutter_screenutil/example/lib/main.dart" |
10 | +>>>>>>> 30a18a0ab24cfbb7f41bc5abd3b88e91b091d595 | ||
7 | export "FLUTTER_BUILD_DIR=build" | 11 | export "FLUTTER_BUILD_DIR=build" |
8 | export "FLUTTER_BUILD_NAME=1.0.0" | 12 | export "FLUTTER_BUILD_NAME=1.0.0" |
9 | export "FLUTTER_BUILD_NUMBER=1" | 13 | export "FLUTTER_BUILD_NUMBER=1" |
@@ -115,4 +115,12 @@ class ScreenUtil { | @@ -115,4 +115,12 @@ class ScreenUtil { | ||
115 | ///Font size adaptation method | 115 | ///Font size adaptation method |
116 | ///- [fontSize] The size of the font on the UI design, in dp. | 116 | ///- [fontSize] The size of the font on the UI design, in dp. |
117 | double setSp(num fontSize) => fontSize * scaleText; | 117 | double setSp(num fontSize) => fontSize * scaleText; |
118 | + | ||
119 | + Widget setVerticalSpacing(num height) => SizedBox( | ||
120 | + height: height * scaleHeight, | ||
121 | + ); | ||
122 | + | ||
123 | + Widget setHorizontalSpacing(num width) => SizedBox( | ||
124 | + width: width * scaleHeight, | ||
125 | + ); | ||
118 | } | 126 | } |
@@ -25,4 +25,10 @@ extension SizeExtension on num { | @@ -25,4 +25,10 @@ extension SizeExtension on num { | ||
25 | ///屏幕高度的倍数 | 25 | ///屏幕高度的倍数 |
26 | ///Multiple of screen height | 26 | ///Multiple of screen height |
27 | double get sh => ScreenUtil().screenHeight * this; | 27 | double get sh => ScreenUtil().screenHeight * this; |
28 | + | ||
29 | + ///[ScreenUtil.setWidth] | ||
30 | + Widget get verticalSpace => ScreenUtil().setVerticalSpacing(this); | ||
31 | + | ||
32 | + ///[ScreenUtil.setHeight] | ||
33 | + Widget get horizontalSpace => ScreenUtil().setHorizontalSpacing(this); | ||
28 | } | 34 | } |
-
Please register or login to post a comment