NishadAvnish

added support for split screen in mobile devices

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:\flutter"
  4 +export "FLUTTER_APPLICATION_PATH=C:\Users\Avnish\Downloads\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"
@@ -12,16 +12,21 @@ class ScreenUtilInit extends StatelessWidget { @@ -12,16 +12,21 @@ class ScreenUtilInit extends StatelessWidget {
12 12
13 /// The [Size] of the device in the design draft, in dp 13 /// The [Size] of the device in the design draft, in dp
14 final Size designSize; 14 final Size designSize;
  15 + BoxConstraints constraints1 = BoxConstraints(maxHeight: 0.0);
15 16
16 @override 17 @override
17 Widget build(BuildContext context) { 18 Widget build(BuildContext context) {
18 return LayoutBuilder(builder: (_, BoxConstraints constraints) { 19 return LayoutBuilder(builder: (_, BoxConstraints constraints) {
19 - if (constraints.maxWidth != 0) {  
20 - final Orientation orientation = constraints.maxWidth > constraints.maxHeight  
21 - ? Orientation.landscape  
22 - : Orientation.portrait; 20 + if (constraints.maxHeight > constraints1.maxHeight) {
  21 + constraints1 = constraints;
  22 + }
  23 + if (constraints1.maxWidth != 0) {
  24 + final Orientation orientation =
  25 + constraints1.maxWidth > constraints1.maxHeight
  26 + ? Orientation.landscape
  27 + : Orientation.portrait;
23 ScreenUtil.init( 28 ScreenUtil.init(
24 - constraints, 29 + constraints1,
25 orientation: orientation, 30 orientation: orientation,
26 designSize: designSize, 31 designSize: designSize,
27 ); 32 );