Showing
4 changed files
with
7 additions
and
4 deletions
@@ -5,7 +5,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | @@ -5,7 +5,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; | ||
5 | class HomePageScaffold extends StatelessWidget { | 5 | class HomePageScaffold extends StatelessWidget { |
6 | const HomePageScaffold({Key? key, this.title = ''}) : super(key: key); | 6 | const HomePageScaffold({Key? key, this.title = ''}) : super(key: key); |
7 | 7 | ||
8 | - void printScreenInformation() { | 8 | + void printScreenInformation(BuildContext context) { |
9 | print('Device Size:${Size(1.sw, 1.sh)}'); | 9 | print('Device Size:${Size(1.sw, 1.sh)}'); |
10 | print('Device pixel density:${ScreenUtil().pixelRatio}'); | 10 | print('Device pixel density:${ScreenUtil().pixelRatio}'); |
11 | print('Bottom safe zone distance dp:${ScreenUtil().bottomBarHeight}dp'); | 11 | print('Bottom safe zone distance dp:${ScreenUtil().bottomBarHeight}dp'); |
@@ -21,7 +21,7 @@ class HomePageScaffold extends StatelessWidget { | @@ -21,7 +21,7 @@ class HomePageScaffold extends StatelessWidget { | ||
21 | 21 | ||
22 | @override | 22 | @override |
23 | Widget build(BuildContext context) { | 23 | Widget build(BuildContext context) { |
24 | - printScreenInformation(); | 24 | + printScreenInformation(context); |
25 | 25 | ||
26 | /// Uncomment if you wanna force current widget to be rebuilt with updated values | 26 | /// Uncomment if you wanna force current widget to be rebuilt with updated values |
27 | /// Must use it if you use the second method, or if you use ScreenUtilInit's child. | 27 | /// Must use it if you use the second method, or if you use ScreenUtilInit's child. |
1 | name: flutter_screenutil | 1 | name: flutter_screenutil |
2 | description: A flutter plugin for adapting screen and font size.Guaranteed to look good on different models | 2 | description: A flutter plugin for adapting screen and font size.Guaranteed to look good on different models |
3 | -version: 5.7.0 | 3 | +version: 5.8.0 |
4 | homepage: https://github.com/OpenFlutter/flutter_screenutil | 4 | homepage: https://github.com/OpenFlutter/flutter_screenutil |
5 | 5 | ||
6 | environment: | 6 | environment: |
-
Please register or login to post a comment