From 953035643de3e7fef83670cd5f83d1350ed5736a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=8D=93=E5=8E=9F?= Date: Thu, 21 Feb 2019 16:08:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E6=A1=A3=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .packages | 2 +- CHANGELOG.md | 4 ++-- README.md | 3 +++ README_CN.md | 2 ++ example/pubspec.lock | 2 +- pubspec.yaml | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.packages b/.packages index 9e745b8..c2de280 100644 --- a/.packages +++ b/.packages @@ -1,4 +1,4 @@ -# Generated by pub on 2019-02-21 15:24:09.886695. +# Generated by pub on 2019-02-21 16:04:26.823126. async:file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib/ boolean_selector:file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-1.0.4/lib/ charcode:file:///D:/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 870ed37..7145498 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,6 @@ setSp(int fontSize, [allowFontScaling = false]) => allowFontScaling ## [0.4.4] - Fix bugs that default fonts change with the system -## [0.5.0] - Fix the wrong way of using +## [0.5.1] - Fix the wrong way of using -please use `ScreenUtil.getInstance()` instead of `ScreenUtil()` , for example: ScreenUtil.getInstance().setHeight(25) instead of `ScreenUtil().setHeight(25)` \ No newline at end of file +It is recommended to use `ScreenUtil.getInstance()` instead of `ScreenUtil()` , for example: `ScreenUtil.getInstance().setHeight(25)` instead of `ScreenUtil().setHeight(25)` \ No newline at end of file diff --git a/README.md b/README.md index 5506f6d..dd10263 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,9 @@ Adapted to screen width: `ScreenUtil.getInstance().setWidth(540)`, Adapted to screen height: `ScreenUtil.getInstance().setHeight(200)`, +You can also use `ScreenUtil()` instead of `ScreenUtil.getInstance()`, +for example:`ScreenUtil().setHeight(200)` + **Note** Height is also adapted according to setWidth to ensure no deformation (when you want a square) diff --git a/README_CN.md b/README_CN.md index 4f0f0cc..d2aeb55 100644 --- a/README_CN.md +++ b/README_CN.md @@ -70,6 +70,8 @@ ScreenUtil.instance = ScreenUtil(width: 750, height: 1334, allowFontScaling: tru 根据屏幕高度适配 `height: ScreenUtil.getInstance().setHeight(200)`, +也可以使用 `ScreenUtil()` 替代 `ScreenUtil.getInstance()`, +例如:`ScreenUtil().setHeight(200)` **注意** diff --git a/example/pubspec.lock b/example/pubspec.lock index 7dbe487..af102e3 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -47,7 +47,7 @@ packages: path: ".." relative: true source: path - version: "0.5.0" + version: "0.5.1" flutter_test: dependency: "direct dev" description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 29d61cd..25aec5a 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: 0.5.0 +version: 0.5.1 author: LiZhuoyuan homepage: https://github.com/OpenFlutter/flutter_ScreenUtil