kageeker

added Vertical and horizontal spacing for lists

#!/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"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
... ...
... ... @@ -109,4 +109,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(
height: width * scaleHeight,
);
}
... ...
... ... @@ -29,4 +29,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);
}
... ...