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
Aneesh Rao
2020-09-30 09:53:26 +0530
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
GitHub
2020-09-30 09:53:26 +0530
Commit
68d958e0218348b946104712cdcfaaba94dceb22
68d958e0
2 parents
385943c5
f8d57c3d
Merge pull request #3 from sidrao2006/num-double-patch
Change type annotations
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
lib/size_extension.dart
lib/size_extension.dart
View file @
68d958e
...
...
@@ -2,25 +2,25 @@ import 'package:flutter_screenutil/screenutil.dart';
extension
SizeExtension
on
num
{
///[ScreenUtil.setWidth]
num
get
w
=>
ScreenUtil
().
setWidth
(
this
);
double
get
w
=>
ScreenUtil
().
setWidth
(
this
);
///[ScreenUtil.setHeight]
num
get
h
=>
ScreenUtil
().
setHeight
(
this
);
double
get
h
=>
ScreenUtil
().
setHeight
(
this
);
///[ScreenUtil.setSp]
num
get
sp
=>
ScreenUtil
().
setSp
(
this
);
double
get
sp
=>
ScreenUtil
().
setSp
(
this
);
///[ScreenUtil.setSp]
num
get
ssp
=>
ScreenUtil
().
setSp
(
this
,
allowFontScalingSelf:
true
);
double
get
ssp
=>
ScreenUtil
().
setSp
(
this
,
allowFontScalingSelf:
true
);
///[ScreenUtil.setSp]
num
get
nsp
=>
ScreenUtil
().
setSp
(
this
,
allowFontScalingSelf:
false
);
double
get
nsp
=>
ScreenUtil
().
setSp
(
this
,
allowFontScalingSelf:
false
);
///屏幕宽度的倍数
///Multiple of screen width
num
get
wp
=>
ScreenUtil
().
screenWidth
*
this
;
double
get
wp
=>
ScreenUtil
().
screenWidth
*
this
;
///屏幕高度的倍数
///Multiple of screen height
num
get
hp
=>
ScreenUtil
().
screenHeight
*
this
;
double
get
hp
=>
ScreenUtil
().
screenHeight
*
this
;
}
...
...
Please
register
or
login
to post a comment