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
LiZhuoyuan
2021-07-28 21:07:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a4667f1a35bf8dd58f5e82be151cbcc2d5170f0c
a4667f1a
1 parent
0086d4bc
代码优化
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
example/ios/Flutter/flutter_export_environment.sh
lib/screenutil_init.dart
example/ios/Flutter/flutter_export_environment.sh
View file @
a4667f1
#!/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_TARGET=lib/main.dart"
export
"FLUTTER_ROOT=D:
\D
evelop
\f
lutter"
export
"FLUTTER_APPLICATION_PATH=D:
\D
evelop
\P
roject
\f
lutter_screenutil
\e
xample"
export
"COCOAPODS_PARALLEL_CODE_SIGN=true"
export
"FLUTTER_TARGET=lib
\m
ain.dart"
export
"FLUTTER_BUILD_DIR=build"
export
"SYMROOT=
${
SOURCE_ROOT
}
/../build
/
ios"
export
"SYMROOT=
${
SOURCE_ROOT
}
/../build
\
i
os"
export
"FLUTTER_BUILD_NAME=1.0.0"
export
"FLUTTER_BUILD_NUMBER=1"
export
"DART_OBFUSCATION=false"
...
...
lib/screenutil_init.dart
View file @
a4667f1
...
...
@@ -16,9 +16,10 @@ class ScreenUtilInit extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
return
LayoutBuilder
(
builder:
(
_
,
BoxConstraints
constraints
)
{
return
OrientationBuilder
(
builder:
(
_
,
Orientation
orientation
)
{
if
(
constraints
.
maxWidth
!=
0
)
{
final
Orientation
orientation
=
constraints
.
maxWidth
>
constraints
.
maxHeight
?
Orientation
.
landscape
:
Orientation
.
portrait
;
ScreenUtil
.
init
(
constraints
,
orientation:
orientation
,
...
...
@@ -27,8 +28,6 @@ class ScreenUtilInit extends StatelessWidget {
return
builder
();
}
return
Container
();
},
);
});
}
}
...
...
Please
register
or
login
to post a comment