Showing
1 changed file
with
5 additions
and
0 deletions
@@ -3,6 +3,7 @@ import 'package:flutter/widgets.dart'; | @@ -3,6 +3,7 @@ import 'package:flutter/widgets.dart'; | ||
3 | import 'screenutil.dart'; | 3 | import 'screenutil.dart'; |
4 | 4 | ||
5 | class ScreenUtilInit extends StatelessWidget { | 5 | class ScreenUtilInit extends StatelessWidget { |
6 | + /// A helper widget that initializes [ScreenUtil] | ||
6 | const ScreenUtilInit({ | 7 | const ScreenUtilInit({ |
7 | @required this.child, | 8 | @required this.child, |
8 | this.designSize = ScreenUtil.defaultSize, | 9 | this.designSize = ScreenUtil.defaultSize, |
@@ -11,7 +12,11 @@ class ScreenUtilInit extends StatelessWidget { | @@ -11,7 +12,11 @@ class ScreenUtilInit extends StatelessWidget { | ||
11 | }) : super(key: key); | 12 | }) : super(key: key); |
12 | 13 | ||
13 | final Widget child; | 14 | final Widget child; |
15 | + | ||
16 | + /// The [Size] of the device in the design draft, in px | ||
14 | final Size designSize; | 17 | final Size designSize; |
18 | + | ||
19 | + /// Sets whether the font size is scaled according to the system's "font size" assist option | ||
15 | final bool allowFontScaling; | 20 | final bool allowFontScaling; |
16 | 21 | ||
17 | @override | 22 | @override |
-
Please register or login to post a comment