LiZhuoyuan
Committed by GitHub

Merge pull request #332 from kageeker/master

Added Vertical and Horizontal Spacing Widget for Columns and Rows
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/lizhuoyuan/Development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/lizhuoyuan/Development/Project/flutter_screenutil/example"
export "FLUTTER_ROOT=C:\dev\flutter"
export "FLUTTER_APPLICATION_PATH=C:\Users\kagee\Documents\flutter_screenutil\example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
<<<<<<< HEAD
export "FLUTTER_TARGET=lib\main.dart"
=======
export "FLUTTER_TARGET=/Users/lizhuoyuan/Development/Project/flutter_screenutil/example/lib/main.dart"
>>>>>>> 30a18a0ab24cfbb7f41bc5abd3b88e91b091d595
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
... ...
... ... @@ -115,4 +115,12 @@ class ScreenUtil {
///Font size adaptation method
///- [fontSize] The size of the font on the UI design, in dp.
double setSp(num fontSize) => fontSize * scaleText;
Widget setVerticalSpacing(num height) => SizedBox(
height: height * scaleHeight,
);
Widget setHorizontalSpacing(num width) => SizedBox(
width: width * scaleHeight,
);
}
... ...
... ... @@ -25,4 +25,10 @@ extension SizeExtension on num {
///屏幕高度的倍数
///Multiple of screen height
double get sh => ScreenUtil().screenHeight * this;
///[ScreenUtil.setWidth]
Widget get verticalSpace => ScreenUtil().setVerticalSpacing(this);
///[ScreenUtil.setHeight]
Widget get horizontalSpace => ScreenUtil().setHorizontalSpacing(this);
}
... ...