Skip to content

Commit

Permalink
优化文档描述
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhuoyuan committed Feb 21, 2019
1 parent 62e454c commit 9530356
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .packages
Original file line number Diff line number Diff line change
@@ -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/
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
It is recommended to use `ScreenUtil.getInstance()` instead of `ScreenUtil()` , for example: `ScreenUtil.getInstance().setHeight(25)` instead of `ScreenUtil().setHeight(25)`
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ ScreenUtil.instance = ScreenUtil(width: 750, height: 1334, allowFontScaling: tru

根据屏幕高度适配 `height: ScreenUtil.getInstance().setHeight(200)`,

也可以使用 `ScreenUtil()` 替代 `ScreenUtil.getInstance()`,
例如:`ScreenUtil().setHeight(200)`

**注意**

Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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 <zhuoyuan93@gmail.com>
homepage: https://github.com/OpenFlutter/flutter_ScreenUtil

Expand Down

0 comments on commit 9530356

Please sign in to comment.