Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
flutter_screenutil
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
NishadAvnish
2021-11-14 13:46:00 +0530
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b1dfa3d75be09ddd6b960ee4331d35239718c94f
b1dfa3d7
1 parent
4d393855
added support for split screen in mobile devices
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
example/ios/Flutter/flutter_export_environment.sh
lib/screenutil_init.dart
example/ios/Flutter/flutter_export_environment.sh
View file @
b1dfa3d
#!/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:
\f
lutter"
export
"FLUTTER_APPLICATION_PATH=C:
\U
sers
\A
vnish
\D
ownloads
\f
lutter_screenutil
\e
xample"
export
"COCOAPODS_PARALLEL_CODE_SIGN=true"
export
"FLUTTER_TARGET=lib
/
main.dart"
export
"FLUTTER_TARGET=lib
\
m
ain.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"
...
...
lib/screenutil_init.dart
View file @
b1dfa3d
...
...
@@ -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
,
constraints
1
,
orientation:
orientation
,
designSize:
designSize
,
);
...
...
Please
register
or
login
to post a comment