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
李卓原
2021-01-05 13:40:22 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
a21502d6946a37080154cd1a4cc711bb4c239c31
a21502d6
2 parents
abd30fef
735d93d2
Merge remote-tracking branch 'origin/master'
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
lib/screenutil.dart
lib/screenutil.dart
View file @
a21502d
...
...
@@ -87,7 +87,7 @@ class ScreenUtil {
double
get
scaleText
=>
min
(
scaleWidth
,
scaleHeight
);
/// 根据UI设计的设备宽度适配
/// 高度也可以根据这个来做适配可以保证不变形,比如你
先
要一个正方形的时候.
/// 高度也可以根据这个来做适配可以保证不变形,比如你
想
要一个正方形的时候.
/// Adapted to the device width of the UI Design.
/// Height can also be adapted according to this to ensure no deformation ,
/// if you want a square
...
...
@@ -103,6 +103,7 @@ class ScreenUtil {
/// does not match the current style effect, or if there is a difference in shape.
double
setHeight
(
num
height
)
=>
height
*
scaleHeight
;
///根据宽度或高度中的较小值进行适配
///Adapt according to the smaller of width or height
double
radius
(
num
r
)
=>
r
*
scaleText
;
...
...
Please
register
or
login
to post a comment