Skip to content

Commit

Permalink
0.6.1 给方法添加了返回类型
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhuoyuan committed Nov 19, 2019
1 parent 1aec636 commit 076a2cf
Show file tree
Hide file tree
Showing 14 changed files with 152 additions and 71 deletions.
81 changes: 45 additions & 36 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,47 @@
* @Author: zhuoyuan93@gmail.com
* @Date: 2018-10-16 19:43:03
* @LastEditors: zhuoyuan93@gmail.com
* @LastEditTime: 2019-08-23 16:41:10
* @LastEditTime: 2019-11-19 11:41
* @Description: Update log
-->

# 0.0.1
# 0.7.0

- first version
- 给所有方法添加返回类型.

# 0.0.2
# 0.6.0

- Fixed bug when releasing
- Completing comments , adding English commentsWelcome to add, correct
- 参数同时支持传入 int / double 或者是var size = 100 , var size = 100.0.
- The argument also supports passing in in / double / var size = 100 /var size = 100.0

# 0.2.2
# 0.5.3

- Optimize documentation
- Change the units of statusBarHeight and bottomBarHeight to dp

# 0.3.0
# 0.5.2

- Add font size adaptation
- Change the parameter type from int to double

# 0.3.1
- setWidth,setHeight,setSp. for example: you can use setWidth(100) or setWidth(100.0)

- Perfect documentation
- Width is enlarged relative to the design draft => The ratio of font and width to the size of the design
- Height is enlarged relative to the design draft => The ratio of height width to the size of the design
# 0.5.1

# 0.4.0
- Fix the wrong way of using

- Optimize font adaptation method
- It is recommended to use `ScreenUtil.getInstance()` instead of `ScreenUtil()` , for example: `ScreenUtil.getInstance().setHeight(25)` instead of `ScreenUtil().setHeight(25)`

# 0.4.1
# 0.4.4

- Fix font adaptation issues
- Fix bugs that default fonts change with the system

# 0.4.3

- Modify the font to change with the system zoom mode. The default value is false.

- setSp(int fontSize, [allowFontScaling = false]) => allowFontScaling
? setWidth(fontSize) \* \_textScaleFactor
: setWidth(fontSize);

# 0.4.2

Expand All @@ -47,36 +55,37 @@
- ///当前设备高度 dp
- ScreenUtil.screenHeightDp

# 0.4.3
# 0.4.1

- Modify the font to change with the system zoom mode. The default value is false.
- Fix font adaptation issues

- setSp(int fontSize, [allowFontScaling = false]) => allowFontScaling
? setWidth(fontSize) \* \_textScaleFactor
: setWidth(fontSize);
# 0.4.0

# 0.4.4
- Optimize font adaptation method

- Fix bugs that default fonts change with the system
# 0.3.1

# 0.5.1
- Perfect documentation
- Width is enlarged relative to the design draft => The ratio of font and width to the size of the design
- Height is enlarged relative to the design draft => The ratio of height width to the size of the design

- Fix the wrong way of using

- It is recommended to use `ScreenUtil.getInstance()` instead of `ScreenUtil()` , for example: `ScreenUtil.getInstance().setHeight(25)` instead of `ScreenUtil().setHeight(25)`
# 0.3.0

# 0.5.2
- Add font size adaptation

- Change the parameter type from int to double
# 0.2.2

- setWidth,setHeight,setSp. for example: you can use setWidth(100) or setWidth(100.0)
- Optimize documentation

# 0.0.2

- Fixed bug when releasing

# 0.0.1

- first version

# 0.5.3

- Change the units of statusBarHeight and bottomBarHeight to dp

# 0.6.0

- Completing comments , adding English commentsWelcome to add, correct
- 参数同时支持传入 int / double 或者是var size = 100 , var size = 100.0.
- The argument also supports passing in in / double / var size = 100 /var size = 100.0
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Column(
//import
import 'package:flutter_screenutil/flutter_screenutil.dart';
...dart
...
@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -178,6 +178,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
Row(
children: <Widget>[
Container(
padding: EdgeInsets.all(ScreenUtil.getInstance().setWidth(10)),
width: ScreenUtil.getInstance().setWidth(375),
height: ScreenUtil.getInstance().setHeight(200),
color: Colors.red,
Expand All @@ -189,6 +190,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
),
),
Container(
padding: EdgeInsets.all(ScreenUtil.getInstance().setWidth(10)),
width: ScreenUtil.getInstance().setWidth(375),
height: ScreenUtil.getInstance().setHeight(200),
color: Colors.blue,
Expand Down
6 changes: 4 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ Column(
```

```
```dart
//导入
import 'package:flutter_screenutil/flutter_screenutil.dart';
...
@override
Widget build(BuildContext context) {
//设置适配尺寸 (填入设计稿中设备的屏幕尺寸) 假如设计稿是按iPhone6的尺寸设计的(iPhone6 750*1334)
Expand Down Expand Up @@ -175,6 +175,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
Row(
children: <Widget>[
Container(
padding: EdgeInsets.all(ScreenUtil.getInstance().setWidth(10)),
width: ScreenUtil.getInstance().setWidth(375),
height: ScreenUtil.getInstance().setHeight(200),
color: Colors.red,
Expand All @@ -187,6 +188,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
),
),
Container(
padding: EdgeInsets.all(ScreenUtil.getInstance().setWidth(10)),
width: ScreenUtil.getInstance().setWidth(375),
height: ScreenUtil.getInstance().setHeight(200),
color: Colors.blue,
Expand Down
17 changes: 17 additions & 0 deletions example/android/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android</name>
<comment>Project android created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
2 changes: 2 additions & 0 deletions example/android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=
eclipse.preferences.version=1
6 changes: 6 additions & 0 deletions example/android/app/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
23 changes: 23 additions & 0 deletions example/android/app/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>app</name>
<comment>Project app created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=..
eclipse.preferences.version=1
10 changes: 10 additions & 0 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=D:\flutter"
export "FLUTTER_APPLICATION_PATH=D:\Project\flutter_ScreenUtil\example"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "FLUTTER_FRAMEWORK_DIR=D:\flutter\bin\cache\artifacts\engine\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
4 changes: 4 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class _MyHomePageState extends State<MyHomePage> {
Row(
children: <Widget>[
Container(
padding:
EdgeInsets.all(ScreenUtil.getInstance().setWidth(10)),
width: ScreenUtil.getInstance().setWidth(375),
height: ScreenUtil.getInstance().setHeight(200),
color: Colors.red,
Expand All @@ -72,6 +74,8 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
Container(
padding:
EdgeInsets.all(ScreenUtil.getInstance().setWidth(10)),
width: ScreenUtil.getInstance().setWidth(375),
height: ScreenUtil.getInstance().setHeight(200),
color: Colors.blue,
Expand Down
6 changes: 5 additions & 1 deletion example/lib/main_zh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class _MyHomePageState extends State<MyHomePage> {
print(
'高度相对于设计稿放大的比例:${ScreenUtil.getInstance().scaleHeight * ScreenUtil.pixelRatio}');
print('系统的字体缩放比例:${ScreenUtil.textScaleFactory}');

return Scaffold(
appBar: AppBar(
title: Text(widget.title),
Expand All @@ -68,6 +68,8 @@ class _MyHomePageState extends State<MyHomePage> {
Row(
children: <Widget>[
Container(
padding:
EdgeInsets.all(ScreenUtil.getInstance().setWidth(10)),
width: ScreenUtil.getInstance().setWidth(375),
height: ScreenUtil.getInstance().setHeight(200),
color: Colors.red,
Expand All @@ -80,6 +82,8 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
Container(
padding:
EdgeInsets.all(ScreenUtil.getInstance().setWidth(10)),
width: ScreenUtil.getInstance().setWidth(375),
height: ScreenUtil.getInstance().setHeight(200),
color: Colors.blue,
Expand Down
Loading

0 comments on commit 076a2cf

Please sign in to comment.