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
李卓原
2023-01-28 17:05:00 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
07d5e48e2596824ddfbd4ae100df54ba28791a28
07d5e48e
1 parent
aa8d8317
change name to spMax,spMin
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
CHANGELOG.md
lib/src/size_extension.dart
CHANGELOG.md
View file @
07d5e48
# 5.6.1
-
add s
mx => max(toDouble(), sp) , for example: 12.sm
x
-
add s
pMax => max(toDouble(), sp), and spMin, for example: 12.spMa
x
# 5.6.0
...
...
lib/src/size_extension.dart
View file @
07d5e48
...
...
@@ -20,9 +20,12 @@ extension SizeExtension on num {
///smart size : it check your value - if it is bigger than your value it will set your value
///for example, you have set 16.sm() , if for your screen 16.sp() is bigger than 16 , then it will set 16 not 16.sp()
///I think that it is good for save size balance on big sizes of screen
double
get
spMin
=>
min
(
toDouble
(),
sp
);
@Deprecated
(
'use spMin instead'
)
double
get
sm
=>
min
(
toDouble
(),
sp
);
double
get
s
m
x
=>
max
(
toDouble
(),
sp
);
double
get
s
pMa
x
=>
max
(
toDouble
(),
sp
);
///屏幕宽度的倍数
///Multiple of screen width
...
...
Please
register
or
login
to post a comment