Showing
2 changed files
with
8 additions
and
8 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" | ||
5 | -export "FLUTTER_TARGET=lib/main.dart" | 3 | +export "FLUTTER_ROOT=D:\Develop\flutter" |
4 | +export "FLUTTER_APPLICATION_PATH=D:\Develop\Project\flutter_screenutil\example" | ||
5 | +export "COCOAPODS_PARALLEL_CODE_SIGN=true" | ||
6 | +export "FLUTTER_TARGET=lib\main.dart" | ||
6 | export "FLUTTER_BUILD_DIR=build" | 7 | export "FLUTTER_BUILD_DIR=build" |
7 | -export "SYMROOT=${SOURCE_ROOT}/../build/ios" | 8 | +export "SYMROOT=${SOURCE_ROOT}/../build\ios" |
8 | export "FLUTTER_BUILD_NAME=1.0.0" | 9 | export "FLUTTER_BUILD_NAME=1.0.0" |
9 | export "FLUTTER_BUILD_NUMBER=1" | 10 | export "FLUTTER_BUILD_NUMBER=1" |
10 | export "DART_OBFUSCATION=false" | 11 | export "DART_OBFUSCATION=false" |
@@ -16,9 +16,10 @@ class ScreenUtilInit extends StatelessWidget { | @@ -16,9 +16,10 @@ class ScreenUtilInit extends StatelessWidget { | ||
16 | @override | 16 | @override |
17 | Widget build(BuildContext context) { | 17 | Widget build(BuildContext context) { |
18 | return LayoutBuilder(builder: (_, BoxConstraints constraints) { | 18 | return LayoutBuilder(builder: (_, BoxConstraints constraints) { |
19 | - return OrientationBuilder( | ||
20 | - builder: (_, Orientation orientation) { | ||
21 | if (constraints.maxWidth != 0) { | 19 | if (constraints.maxWidth != 0) { |
20 | + final Orientation orientation = constraints.maxWidth > constraints.maxHeight | ||
21 | + ? Orientation.landscape | ||
22 | + : Orientation.portrait; | ||
22 | ScreenUtil.init( | 23 | ScreenUtil.init( |
23 | constraints, | 24 | constraints, |
24 | orientation: orientation, | 25 | orientation: orientation, |
@@ -27,8 +28,6 @@ class ScreenUtilInit extends StatelessWidget { | @@ -27,8 +28,6 @@ class ScreenUtilInit extends StatelessWidget { | ||
27 | return builder(); | 28 | return builder(); |
28 | } | 29 | } |
29 | return Container(); | 30 | return Container(); |
30 | - }, | ||
31 | - ); | ||
32 | }); | 31 | }); |
33 | } | 32 | } |
34 | } | 33 | } |
-
Please register or login to post a comment