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
lizhuoyuan
2019-11-29 11:39:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ccb666f4b837dea03e1564925c33c4d384d4d0bf
ccb666f4
1 parent
5a775c5a
0.7.0 修复一个拼写错误
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
48 additions
and
44 deletions
.packages
CHANGELOG.md
README_CN.md
README_PT.md
example/lib/main.dart
example/lib/main_zh.dart
example/pubspec.lock
pubspec.lock
pubspec.yaml
.packages
View file @
ccb666f
# Generated by pub on 2019-08-23 16:15:58.801584.
async:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.2.0/lib/
boolean_selector:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.4/lib/
# Generated by pub on 2019-11-29 11:35:05.551229.
async:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.3.0/lib/
boolean_selector:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.5/lib/
charcode:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2/lib/
collection:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11/lib/
flutter:file:///D:/flutter/packages/flutter/lib/
flutter_test:file:///D:/flutter/packages/flutter_test/lib/
matcher:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.5/lib/
meta:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.6/lib/
path:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.2/lib/
pedantic:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.7.0/lib/
quiver:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.3/lib/
meta:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.7/lib/
path:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.4/lib/
pedantic:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.8.0+1/lib/
quiver:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.5/lib/
sky_engine:file:///D:/flutter/bin/cache/pkg/sky_engine/lib/
source_span:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.5/lib/
stack_trace:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib/
stream_channel:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.0.0/lib/
string_scanner:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.
4
/lib/
string_scanner:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.
5
/lib/
term_glyph:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib/
test_api:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.5/lib/
typed_data:file:///D:/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib/
...
...
CHANGELOG.md
View file @
ccb666f
...
...
@@ -6,9 +6,13 @@
*
@Description: Update log
-->
#0.7.0
-
Replace textScaleFactory with textScaleFactor , It's a typo.
# 0.6.1
-
给所有方法添加返回类型.
-
Add return types to all methods.
# 0.6.0
...
...
README_CN.md
View file @
ccb666f
...
...
@@ -130,7 +130,7 @@ Column(
ScreenUtil.screenHeight //设备高度
ScreenUtil.bottomBarHeight //底部安全区距离,适用于全面屏下面有按键的
ScreenUtil.statusBarHeight //状态栏高度 刘海屏会更高 单位px
ScreenUtil.textScaleFactor
y
//系统字体缩放比例
ScreenUtil.textScaleFactor //系统字体缩放比例
ScreenUtil.getInstance().scaleWidth // 实际宽度的dp与设计稿px的比例
ScreenUtil.getInstance().scaleHeight // 实际高度的dp与设计稿px的比例
...
...
@@ -163,7 +163,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
'宽度和字体相对于设计稿放大的比例:
${ScreenUtil.getInstance().scaleWidth * ScreenUtil.pixelRatio}
'
);
print
(
'高度相对于设计稿放大的比例:
${ScreenUtil.getInstance().scaleHeight * ScreenUtil.pixelRatio}
'
);
print
(
'系统的字体缩放比例:
${ScreenUtil.textScaleFactor
y
}
'
);
print
(
'系统的字体缩放比例:
${ScreenUtil.textScaleFactor}
'
);
return
new
Scaffold
(
appBar:
new
AppBar
(
...
...
@@ -225,7 +225,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
SizedBox
(
height:
ScreenUtil
.
getInstance
().
setHeight
(
100
),
),
Text
(
'系统的字体缩放比例:
${ScreenUtil.textScaleFactor
y
}
'
),
Text
(
'系统的字体缩放比例:
${ScreenUtil.textScaleFactor}
'
),
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
...
...
README_PT.md
View file @
ccb666f
...
...
@@ -134,7 +134,7 @@ Column(
ScreenUtil
.
screenHeight
//Altura da tela do dispositivo
ScreenUtil
.
bottomBarHeight
//Distância segura do rodapé, adequada para botões em tela cheia
ScreenUtil
.
statusBarHeight
//Altura da status bar em pixels, Notch será maior
ScreenUtil
.
textScaleFactor
y
//Fator de escala da fonte do sistema
ScreenUtil
.
textScaleFactor
//Fator de escala da fonte do sistema
ScreenUtil
.
getInstance
().
scaleWidth
//Razão entre a largura atual e a largura do protótipo de design em pixels
ScreenUtil
.
getInstance
().
scaleHeight
//Razão entre a altura atual e a altura do protótipo de design em pixels
...
...
@@ -227,7 +227,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
SizedBox
(
height:
ScreenUtil
.
getInstance
().
setHeight
(
100
),
),
Text
(
'Fator de escala da fonte do sistema:
${ScreenUtil.textScaleFactor
y
}
'
),
Text
(
'Fator de escala da fonte do sistema:
${ScreenUtil.textScaleFactor}
'
),
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
...
...
example/lib/main.dart
View file @
ccb666f
...
...
@@ -105,7 +105,7 @@ class _MyHomePageState extends State<MyHomePage> {
SizedBox
(
height:
ScreenUtil
.
getInstance
().
setHeight
(
100
),
),
Text
(
'System font scaling factor:
${ScreenUtil.textScaleFactor
y
}
'
),
Text
(
'System font scaling factor:
${ScreenUtil.textScaleFactor}
'
),
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
...
...
example/lib/main_zh.dart
View file @
ccb666f
...
...
@@ -47,7 +47,7 @@ class _MyHomePageState extends State<MyHomePage> {
'宽度和字体相对于设计稿放大的比例:
${ScreenUtil.getInstance().scaleWidth * ScreenUtil.pixelRatio}
'
);
print
(
'高度相对于设计稿放大的比例:
${ScreenUtil.getInstance().scaleHeight * ScreenUtil.pixelRatio}
'
);
print
(
'系统的字体缩放比例:
${ScreenUtil.textScaleFactor
y
}
'
);
print
(
'系统的字体缩放比例:
${ScreenUtil.textScaleFactor}
'
);
return
Scaffold
(
appBar:
AppBar
(
...
...
@@ -115,7 +115,7 @@ class _MyHomePageState extends State<MyHomePage> {
SizedBox
(
height:
ScreenUtil
.
getInstance
().
setHeight
(
100
),
),
Text
(
'系统的字体缩放比例:
${ScreenUtil.textScaleFactor
y
}
'
),
Text
(
'系统的字体缩放比例:
${ScreenUtil.textScaleFactor}
'
),
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
...
...
example/pubspec.lock
View file @
ccb666f
...
...
@@ -5,35 +5,35 @@ packages:
dependency: transitive
description:
name: async
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "2.3.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "1.0.5"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "1.14.11"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "0.1.2"
flutter:
...
...
@@ -47,7 +47,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.6.
0
"
version: "0.6.
1
"
flutter_test:
dependency: "direct dev"
description: flutter
...
...
@@ -57,35 +57,35 @@ packages:
dependency: transitive
description:
name: matcher
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "0.12.5"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "1.1.7"
path:
dependency: transitive
description:
name: path
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "1.6.4"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "1.8.0+1"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "2.0.5"
sky_engine:
...
...
@@ -97,56 +97,56 @@ packages:
dependency: transitive
description:
name: source_span
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "1.5.5"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "1.9.3"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "2.0.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "1.0.5"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "1.1.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "0.2.5"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "1.1.6"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.
dartlang.org
"
url: "https://pub.
flutter-io.cn
"
source: hosted
version: "2.0.8"
sdks:
...
...
pubspec.lock
View file @
ccb666f
...
...
@@ -7,14 +7,14 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.
2
.0"
version: "2.
3
.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.
4
"
version: "1.0.
5
"
charcode:
dependency: transitive
description:
...
...
@@ -52,28 +52,28 @@ packages:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.
6
"
version: "1.1.
7
"
path:
dependency: transitive
description:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.
2
"
version: "1.6.
4
"
pedantic:
dependency: transitive
description:
name: pedantic
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.
7.0
"
version: "1.
8.0+1
"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.
3
"
version: "2.0.
5
"
sky_engine:
dependency: transitive
description: flutter
...
...
@@ -106,7 +106,7 @@ packages:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.
4
"
version: "1.0.
5
"
term_glyph:
dependency: transitive
description:
...
...
pubspec.yaml
View file @
ccb666f
name
:
flutter_screenutil
description
:
A flutter plugin for adapting screen and font size.Guaranteed to look good on different models
version
:
0.
6.1
version
:
0.
7.0
author
:
LiZhuoyuan <zhuoyuan93@gmail.com>
homepage
:
https://github.com/OpenFlutter/flutter_ScreenUtil
...
...
Please
register
or
login
to post a comment