Skip to content

Commit 68d958e

Browse files
authored
Merge pull request #3 from sidrao2006/num-double-patch
Change type annotations
2 parents 385943c + f8d57c3 commit 68d958e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/size_extension.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ import 'package:flutter_screenutil/screenutil.dart';
22

33
extension SizeExtension on num {
44
///[ScreenUtil.setWidth]
5-
num get w => ScreenUtil().setWidth(this);
5+
double get w => ScreenUtil().setWidth(this);
66

77
///[ScreenUtil.setHeight]
8-
num get h => ScreenUtil().setHeight(this);
8+
double get h => ScreenUtil().setHeight(this);
99

1010
///[ScreenUtil.setSp]
11-
num get sp => ScreenUtil().setSp(this);
11+
double get sp => ScreenUtil().setSp(this);
1212

1313
///[ScreenUtil.setSp]
14-
num get ssp => ScreenUtil().setSp(this, allowFontScalingSelf: true);
14+
double get ssp => ScreenUtil().setSp(this, allowFontScalingSelf: true);
1515

1616
///[ScreenUtil.setSp]
17-
num get nsp => ScreenUtil().setSp(this, allowFontScalingSelf: false);
17+
double get nsp => ScreenUtil().setSp(this, allowFontScalingSelf: false);
1818

1919
///屏幕宽度的倍数
2020
///Multiple of screen width
21-
num get wp => ScreenUtil().screenWidth * this;
21+
double get wp => ScreenUtil().screenWidth * this;
2222

2323
///屏幕高度的倍数
2424
///Multiple of screen height
25-
num get hp => ScreenUtil().screenHeight * this;
25+
double get hp => ScreenUtil().screenHeight * this;
2626
}

0 commit comments

Comments
 (0)