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
2020-01-14 12:07:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
dad78776861c7584c364cd8ee24c35e632c182d7
dad78776
1 parent
3e710014
fix #89
优化屏幕旋转效果 字体适配统一使用宽度
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
6 deletions
CHANGELOG.md
README.md
README_CN.md
README_PT.md
example/lib/main_zh.dart
lib/flutter_screenutil.dart
pubspec.yaml
CHANGELOG.md
View file @
dad7877
...
...
@@ -5,6 +5,10 @@
*
@LastEditTime: 2020年1月6日 16:41:02
*
@Description: Update log
-->
# 1.0.1
-
fix #89
-
优化屏幕旋转效果
-
字体适配统一使用宽度
# 1.0.1
-
Rebuild code, change API
...
...
README.md
View file @
dad7877
...
...
@@ -23,7 +23,7 @@ dependencies:
flutter:
sdk: flutter
# add flutter_screenutil
flutter_screenutil: ^1.0.
1
flutter_screenutil: ^1.0.
2
```
### Add the following imports to your Dart code:
...
...
README_CN.md
View file @
dad7877
...
...
@@ -27,7 +27,7 @@ dependencies:
flutter:
sdk: flutter
# 添加依赖
flutter_screenutil: ^1.0.
1
flutter_screenutil: ^1.0.
2
```
### 在每个使用的地方导入包:
...
...
README_PT.md
View file @
dad7877
...
...
@@ -23,7 +23,7 @@ dependencies:
flutter:
sdk: flutter
# add flutter_screenutil
flutter_screenutil: ^1.0.
1
flutter_screenutil: ^1.0.
2
```
### Adicione o seguinte import em seu código Dart:
...
...
example/lib/main_zh.dart
View file @
dad7877
...
...
@@ -55,7 +55,7 @@ class _ExampleWidgetState extends State<ExampleWidget> {
appBar:
AppBar
(
title:
Text
(
widget
.
title
),
),
body:
Center
(
body:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
...
...
lib/flutter_screenutil.dart
View file @
dad7877
...
...
@@ -94,7 +94,7 @@ class ScreenUtil {
double
get
scaleHeight
=>
_screenHeight
/
uiHeightPx
;
double
get
scaleText
=>
scaleWidth
>
scaleHeight
?
scaleWidth
:
scaleHeight
;
double
get
scaleText
=>
scaleWidth
;
/// 根据UI设计的设备宽度适配
/// 高度也可以根据这个来做适配可以保证不变形,比如你先要一个正方形的时候.
...
...
pubspec.yaml
View file @
dad7877
name
:
flutter_screenutil
description
:
A flutter plugin for adapting screen and font size.Guaranteed to look good on different models
version
:
1.0.
1
version
:
1.0.
2
homepage
:
https://github.com/OpenFlutter/flutter_screenutil
environment
:
...
...
Please
register
or
login
to post a comment