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 14:45:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
aa8d83172f93dc8b077b273da3a35806f97ffc25
aa8d8317
1 parent
9ddb7a72
smx => max(toDouble(), sp)
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
9 deletions
CHANGELOG.md
example/lib/src/home.dart
lib/src/size_extension.dart
CHANGELOG.md
View file @
aa8d831
# 5.6.1
-
add smx => max(toDouble(), sp) , for example: 12.smx
# 5.6.0
-
bug fix: #434
-
add w and h on EdgeInsets,Radius,BorderRadius,BoxConstraints
# 5.5.4
-
Bug Fix: False sizes when using DevicePreview
# 5.5.3+2
-
Fix #398
# 5.5.3+1
-
Fix compatibility with flutter sdk 2.x
# 5.5.3
-
Bug Fix: Some widgets disapear because of parent rebuild.
-
Bug Fix: issue #362. Null check operator used on a null value when using ScreenUtil.init().
-
Re-add context to builder parameters
**(users request)**
.
-
Add some standard rebuild factors.
# 5.5.2
-
Add rebuildFactor property
-
Bug Fix: False sizes when resizing
# 5.5.1
-
Bug Fix: Assertion Failed (Find MediaQuery in ancestors)
-
Some performance improvements and fixes
# 5.5.0
-
Bug Fix: Reaching context that no longer used.
# 5.4.0+1
-
delete log
# 5.4.0
-
merge #352
# 5.3.1
-
add num.verticalSpacingRadius
num.horizontalSpaceRadius
num.setVerticalSpacingFromWidth
-
add num.verticalSpacingRadius num.horizontalSpaceRadius num.setVerticalSpacingFromWidth
-
update num.horizontalSpace
# 5.3.0
-
For the size, use the context to get it first, which needs to provide the Context
More rigorous context checking
-
For the size, use the context to get it first, which needs to provide the Context More rigorous
context checking
# 5.2.0
-
Rollback of 5.1.1 commit
-
Fix the problem of inaccurate height
-
merge #332(https://github.com/OpenFlutter/flutter_screenutil/pull/332)
add
num.setVerticalSpacing // SizedBox(height: num
*
scaleHeight)
num.horizontalSpace // SizedBox(height: num
*
scaleWidth)
add num.setVerticalSpacing // SizedBox(height: num
*
scaleHeight)
num.horizontalSpace // SizedBox(height: num
*
scaleWidth)
# 5.1.1
...
...
example/lib/src/home.dart
View file @
aa8d831
...
...
@@ -35,6 +35,7 @@ class HomePageScaffold extends StatelessWidget {
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
RSizedBox
.
square
(
dimension:
20
),
Row
(
children:
<
Widget
>[
// Using Extensions
...
...
lib/src/size_extension.dart
View file @
aa8d831
...
...
@@ -22,6 +22,8 @@ extension SizeExtension on num {
///I think that it is good for save size balance on big sizes of screen
double
get
sm
=>
min
(
toDouble
(),
sp
);
double
get
smx
=>
max
(
toDouble
(),
sp
);
///屏幕宽度的倍数
///Multiple of screen width
double
get
sw
=>
ScreenUtil
().
screenWidth
*
this
;
...
...
Please
register
or
login
to post a comment