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
Mounir Bouaiche
2023-06-11 20:33:51 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
99c24dd09c1346671894ebcadf34088019047bcd
99c24dd0
1 parent
53651007
Add scale factors: diagonal & diameter
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
lib/src/screen_util.dart
lib/src/screen_util.dart
View file @
99c24dd
...
...
@@ -207,6 +207,12 @@ class ScreenUtil {
///Adapt according to the smaller of width or height
double
radius
(
num
r
)
=>
r
*
min
(
scaleWidth
,
scaleHeight
);
/// Adapt according to the both width and height
double
diagonal
(
num
d
)
=>
d
*
scaleHeight
*
scaleWidth
;
/// Adapt according to the maximum value of scale width and scale height
double
diameter
(
num
d
)
=>
d
*
max
(
scaleWidth
,
scaleHeight
);
///字体大小适配方法
///- [fontSize] UI设计上字体的大小,单位dp.
///Font size adaptation method
...
...
Please
register
or
login
to post a comment