diff --git a/CHANGELOG.md b/CHANGELOG.md index 800a067..030347a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 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(). diff --git a/README_CN.md b/README_CN.md index dbdfd3c..b5b1af8 100644 --- a/README_CN.md +++ b/README_CN.md @@ -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* | 返回屏幕指标更改时是否重建。 | + ### 初始化并设置适配尺寸及字体大小是否根据系统的“字体大小”辅助选项来进行缩放 在使用之前请设置好设计稿的宽度和高度,传入设计稿的宽度和高度(单位随意,但在使用过程中必须保持一致) diff --git a/lib/src/screen_util.dart b/lib/src/screen_util.dart index c9c2775..2f7b93b 100644 --- a/lib/src/screen_util.dart +++ b/lib/src/screen_util.dart @@ -115,6 +115,7 @@ class ScreenUtil { : Orientation.portrait); _instance + .._context = context .._uiSize = designSize .._splitScreenMode = splitScreenMode .._minTextAdapt = minTextAdapt diff --git a/pubspec.yaml b/pubspec.yaml index 31338d1..d6ba915 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ 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: