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
zhuoyuan
2022-05-23 10:31:38 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ebf9fa143a1f32dffd76067b189e6aa45fe3a6be
ebf9fa14
1 parent
c25192d1
fix #398
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletions
CHANGELOG.md
README_CN.md
lib/src/screen_util.dart
pubspec.yaml
CHANGELOG.md
View file @
ebf9fa1
# 5.5.3+2
-
Fix #398
# 5.5.3+1
-
Fix compatibility with flutter sdk 2.x
# 5.5.3
-
Bug Fix: Some widgets disapear because of parent rebuild.
-
Bug Fix: issue #362. Null check operator used on a null value when using ScreenUtil.init().
...
...
README_CN.md
View file @
ebf9fa1
...
...
@@ -42,11 +42,15 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|属性|类型|默认值|描述|
|:---|:---|:---|:---|
|designSize|Size|Size(360, 690)|设计稿中设备的尺寸(单位随意,建议dp,但在使用过程中必须保持一致)|
| deviceSize | Size | null | 物理设备的大小 |
|builder|Widget Function()|Container()|一般返回一个MaterialApp类型的Function()|
|orientation|Orientation|portrait|屏幕方向|
|splitScreenMode|bool|false|支持分屏尺寸|
|minTextAdapt|bool|false|是否根据宽度/高度中的最小值适配文字|
|context|BuildContext|null|传入context会更灵敏的根据屏幕变化而改变|
| child | Widget | null | builder的一部分,其依赖项属性不使用该库 |
| rebuildFactor | Function |
*default*
| 返回屏幕指标更改时是否重建。 |
### 初始化并设置适配尺寸及字体大小是否根据系统的“字体大小”辅助选项来进行缩放
在使用之前请设置好设计稿的宽度和高度,传入设计稿的宽度和高度(单位随意,但在使用过程中必须保持一致)
...
...
lib/src/screen_util.dart
View file @
ebf9fa1
...
...
@@ -115,6 +115,7 @@ class ScreenUtil {
:
Orientation
.
portrait
);
_instance
..
_context
=
context
..
_uiSize
=
designSize
..
_splitScreenMode
=
splitScreenMode
..
_minTextAdapt
=
minTextAdapt
...
...
pubspec.yaml
View file @
ebf9fa1
name
:
flutter_screenutil
description
:
A flutter plugin for adapting screen and font size.Guaranteed to look good on different models
version
:
5.5.3
version
:
5.5.3
+2
homepage
:
https://github.com/OpenFlutter/flutter_screenutil
environment
:
...
...
Please
register
or
login
to post a comment