NishadAvnish

added support for split screen in mobile devices

#!/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:\flutter"
export "FLUTTER_APPLICATION_PATH=C:\Users\Avnish\Downloads\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"
... ...
... ... @@ -12,16 +12,21 @@ class ScreenUtilInit extends StatelessWidget {
/// The [Size] of the device in the design draft, in dp
final Size designSize;
BoxConstraints constraints1 = BoxConstraints(maxHeight: 0.0);
@override
Widget build(BuildContext context) {
return LayoutBuilder(builder: (_, BoxConstraints constraints) {
if (constraints.maxWidth != 0) {
final Orientation orientation = constraints.maxWidth > constraints.maxHeight
if (constraints.maxHeight > constraints1.maxHeight) {
constraints1 = constraints;
}
if (constraints1.maxWidth != 0) {
final Orientation orientation =
constraints1.maxWidth > constraints1.maxHeight
? Orientation.landscape
: Orientation.portrait;
ScreenUtil.init(
constraints,
constraints1,
orientation: orientation,
designSize: designSize,
);
... ...