Showing
3 changed files
with
17 additions
and
4 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 | -export "FLUTTER_TARGET=lib/main.dart" | 6 | +export "FLUTTER_TARGET=lib\main.dart" |
| 7 | export "FLUTTER_BUILD_DIR=build" | 7 | export "FLUTTER_BUILD_DIR=build" |
| 8 | -export "SYMROOT=${SOURCE_ROOT}/../build/ios" | ||
| 9 | export "FLUTTER_BUILD_NAME=1.0.0" | 8 | export "FLUTTER_BUILD_NAME=1.0.0" |
| 10 | export "FLUTTER_BUILD_NUMBER=1" | 9 | export "FLUTTER_BUILD_NUMBER=1" |
| 11 | export "DART_OBFUSCATION=false" | 10 | export "DART_OBFUSCATION=false" |
| @@ -109,4 +109,12 @@ class ScreenUtil { | @@ -109,4 +109,12 @@ class ScreenUtil { | ||
| 109 | ///Font size adaptation method | 109 | ///Font size adaptation method |
| 110 | ///- [fontSize] The size of the font on the UI design, in dp. | 110 | ///- [fontSize] The size of the font on the UI design, in dp. |
| 111 | double setSp(num fontSize) => fontSize * scaleText; | 111 | double setSp(num fontSize) => fontSize * scaleText; |
| 112 | + | ||
| 113 | + Widget setVerticalSpacing(num height) => SizedBox( | ||
| 114 | + height: height * scaleHeight, | ||
| 115 | + ); | ||
| 116 | + | ||
| 117 | + Widget setHorizontalSpacing(num width) => SizedBox( | ||
| 118 | + height: width * scaleHeight, | ||
| 119 | + ); | ||
| 112 | } | 120 | } |
| @@ -29,4 +29,10 @@ extension SizeExtension on num { | @@ -29,4 +29,10 @@ extension SizeExtension on num { | ||
| 29 | ///屏幕高度的倍数 | 29 | ///屏幕高度的倍数 |
| 30 | ///Multiple of screen height | 30 | ///Multiple of screen height |
| 31 | double get sh => ScreenUtil().screenHeight * this; | 31 | double get sh => ScreenUtil().screenHeight * this; |
| 32 | + | ||
| 33 | + ///[ScreenUtil.setWidth] | ||
| 34 | + Widget get verticalSpace => ScreenUtil().setVerticalSpacing(this); | ||
| 35 | + | ||
| 36 | + ///[ScreenUtil.setHeight] | ||
| 37 | + Widget get horizontalSpace => ScreenUtil().setHorizontalSpacing(this); | ||
| 32 | } | 38 | } |
-
Please register or login to post a comment