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
Mounir-Bouaiche
2022-05-01 21:24:06 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a6d4c02183d6321cc4b91714e2cadcf6cd438d79
a6d4c021
1 parent
f50805e4
Update README.md
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
README.md
README.md
View file @
a6d4c02
...
...
@@ -39,15 +39,16 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
### Property
| Property | Type | Default Value | Description |
| --------------- | ------------- | -------------- | ---------------------------------------------------------------------- |
| deviceSize | Size | null | The size of the physical device |
| designSize | Size | Size(360, 690) | The size of the device screen in the design draft, in dp |
| builder | WidgetBuilder | (
*required*
) | Generally returning a Function of MaterialApp type |
| orientation | Orientation | portrait | screen orientation |
| splitScreenMode | bool | false | support for split screen |
| minTextAdapt | bool | false | Whether to adapt the text according to the minimum of width and height |
| context | BuildContext | null | Get physical device data if not provided, by MediaQuery.of(context) |
| Property | Type | Default Value | Description |
| --------------- | ------------ | ------------- | ---------------------------------------------------------------------- |
| deviceSize | Size | null | The size of the physical device |
| designSize | Size | Size(360,690) | The size of the device screen in the design draft, in dp |
| builder | Function | null | Generally returning a Function of MaterialApp type |
| child | Widget | null | A part of builder that never being rebuilt |
| orientation | Orientation | portrait | screen orientation |
| splitScreenMode | bool | false | support for split screen |
| minTextAdapt | bool | false | Whether to adapt the text according to the minimum of width and height |
| context | BuildContext | null | Get physical device data if not provided, by MediaQuery.of(context) |
### Initialize and set the fit size and font size to scale according to the system's "font size" accessibility option
...
...
@@ -66,20 +67,19 @@ class MyApp extends StatelessWidget {
designSize:
Size
(
360
,
690
),
minTextAdapt:
true
,
splitScreenMode:
true
,
builder:
(
_
)
{
builder:
(
child
)
{
return
MaterialApp
(
debugShowCheckedModeBanner:
false
,
// Use this line to prevent extra rebuilds
useInheritedMediaQuery:
true
,
title:
'First Method'
,
// You can use the library anywhere in the app even in theme
theme:
ThemeData
(
primarySwatch:
Colors
.
blue
,
textTheme:
TextTheme
(
bodyText2:
TextStyle
(
fontSize:
30
.
sp
)),
),
home:
HomePage
(
title:
'First Method'
)
,
home:
child
,
);
},
child:
HomePage
(
title:
'First Method'
),
);
}
}
...
...
Please
register
or
login
to post a comment