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
WJG
2021-02-05 11:12:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
170cbf172b951bfcfdd704e47467621282a6d034
170cbf17
1 parent
7dcf623d
fix #196, #209
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
README.md
README_CN.md
README_PT.md
example/lib/main.dart
example/lib/main_zh.dart
lib/screenutil_init.dart
README.md
View file @
170cbf1
...
...
@@ -50,7 +50,7 @@ class MyApp extends StatelessWidget {
return
ScreenUtilInit
(
designSize:
Size
(
360
,
690
),
allowFontScaling:
false
,
child:
MaterialApp
(
builder:
()
=>
MaterialApp
(
...
),
);
...
...
README_CN.md
View file @
170cbf1
...
...
@@ -58,7 +58,7 @@ class MyApp extends StatelessWidget {
return
ScreenUtilInit
(
designSize:
Size
(
360
,
690
),
allowFontScaling:
false
,
child:
MaterialApp
(
builder:
()
=>
MaterialApp
(
...
),
);
...
...
README_PT.md
View file @
170cbf1
...
...
@@ -54,7 +54,7 @@ class MyApp extends StatelessWidget {
return
ScreenUtilInit
(
designSize:
Size
(
360
,
690
),
allowFontScaling:
false
,
child:
MaterialApp
(
builder:
()
=>
MaterialApp
(
...
),
);
...
...
example/lib/main.dart
View file @
170cbf1
...
...
@@ -10,7 +10,7 @@ class MyApp extends StatelessWidget {
return
ScreenUtilInit
(
designSize:
Size
(
360
,
690
),
allowFontScaling:
false
,
child:
MaterialApp
(
builder:
()
=>
MaterialApp
(
debugShowCheckedModeBanner:
false
,
title:
'Flutter_ScreenUtil'
,
theme:
ThemeData
(
...
...
example/lib/main_zh.dart
View file @
170cbf1
...
...
@@ -10,7 +10,7 @@ class MyApp extends StatelessWidget {
return
ScreenUtilInit
(
designSize:
Size
(
750
,
1334
),
allowFontScaling:
false
,
child:
MaterialApp
(
builder:
()
=>
MaterialApp
(
debugShowCheckedModeBanner:
false
,
title:
'Flutter_ScreenUtil'
,
theme:
ThemeData
(
...
...
lib/screenutil_init.dart
View file @
170cbf1
...
...
@@ -5,13 +5,13 @@ import 'screenutil.dart';
class
ScreenUtilInit
extends
StatelessWidget
{
/// A helper widget that initializes [ScreenUtil]
ScreenUtilInit
({
required
this
.
child
,
required
this
.
builder
,
this
.
designSize
=
ScreenUtil
.
defaultSize
,
this
.
allowFontScaling
=
false
,
Key
?
key
,
})
:
super
(
key:
key
);
final
Widget
child
;
final
Widget
Function
()
builder
;
/// The [Size] of the device in the design draft, in dp
final
Size
designSize
;
...
...
@@ -31,7 +31,7 @@ class ScreenUtilInit extends StatelessWidget {
allowFontScaling:
allowFontScaling
,
);
}
return
child
;
return
builder
()
;
},
);
}
...
...
Please
register
or
login
to post a comment