@@ -56,57 +56,53 @@ class _MediaQueryRouteWidgetState extends State<MediaQueryRouteWidget> {
56
56
appBar: AppBar (
57
57
title: const Text ('media query demo' ),
58
58
),
59
- body: Column (
60
- crossAxisAlignment: CrossAxisAlignment .start,
61
- children: < Widget > [
62
- Expanded (
63
- flex: 2 ,
64
- child: Container (
65
- margin: const EdgeInsets .all (24.0 ),
66
- child: Column (
67
- crossAxisAlignment: CrossAxisAlignment .start,
68
- children: < Widget > [
69
- Text ('top: ${MediaQuery .of (context ).padding .top }' ),
70
- Text (
71
- 'bottom: ${MediaQuery .of (context ).padding .bottom }' ),
72
- Text ('width: ${MediaQuery .of (context ).size .width }' ),
73
- Text ('height: ${MediaQuery .of (context ).size .height }' )
74
- ]))),
75
- Expanded (
76
- flex: 1 ,
77
- child: Column (
78
- mainAxisAlignment: MainAxisAlignment .end,
79
- crossAxisAlignment: CrossAxisAlignment .start,
80
- children: < Widget > [
81
- InkWell (
82
- child: Container (
83
- padding: const EdgeInsets .all (8.0 ),
84
- margin: const EdgeInsets .all (8.0 ),
85
- color: Colors .yellow,
86
- child: const Text (
87
- 'Pop with Navigator' ,
88
- style:
89
- TextStyle (fontSize: 22.0 , color: Colors .black),
90
- )),
91
- onTap: () => Navigator .of (context).pop (
92
- 'I am Navigator from MediaQueryRouteWidget too!' ),
93
- ),
94
- InkWell (
95
- child: Container (
96
- padding: const EdgeInsets .all (8.0 ),
97
- margin: const EdgeInsets .all (8.0 ),
98
- color: Colors .yellow,
99
- child: const Text (
100
- 'Pop with BoostNavigator' ,
101
- style:
102
- TextStyle (fontSize: 22.0 , color: Colors .black),
103
- )),
104
- onTap: () => BoostNavigator .instance.pop (
105
- 'I am BoostNavigator from MediaQueryRouteWidget!' ),
106
- ),
107
- ]),
108
- ),
109
- ]),
59
+ body: Column (crossAxisAlignment: CrossAxisAlignment .start, children: <
60
+ Widget > [
61
+ Expanded (
62
+ flex: 2 ,
63
+ child: Container (
64
+ margin: const EdgeInsets .all (24.0 ),
65
+ child: Column (
66
+ crossAxisAlignment: CrossAxisAlignment .start,
67
+ children: < Widget > [
68
+ Text ('top: ${MediaQuery .of (context ).padding .top }' ),
69
+ Text ('bottom: ${MediaQuery .of (context ).padding .bottom }' ),
70
+ Text ('width: ${MediaQuery .of (context ).size .width }' ),
71
+ Text ('height: ${MediaQuery .of (context ).size .height }' )
72
+ ]))),
73
+ Expanded (
74
+ flex: 1 ,
75
+ child: Column (
76
+ mainAxisAlignment: MainAxisAlignment .end,
77
+ crossAxisAlignment: CrossAxisAlignment .start,
78
+ children: < Widget > [
79
+ InkWell (
80
+ child: Container (
81
+ padding: const EdgeInsets .all (8.0 ),
82
+ margin: const EdgeInsets .all (8.0 ),
83
+ color: Colors .yellow,
84
+ child: const Text (
85
+ 'Pop with Navigator' ,
86
+ style: TextStyle (fontSize: 22.0 , color: Colors .black),
87
+ )),
88
+ onTap: () => Navigator .of (context)
89
+ .pop ('I am Navigator from MediaQueryRouteWidget too!' ),
90
+ ),
91
+ InkWell (
92
+ child: Container (
93
+ padding: const EdgeInsets .all (8.0 ),
94
+ margin: const EdgeInsets .all (8.0 ),
95
+ color: Colors .yellow,
96
+ child: const Text (
97
+ 'Pop with BoostNavigator' ,
98
+ style: TextStyle (fontSize: 22.0 , color: Colors .black),
99
+ )),
100
+ onTap: () => BoostNavigator .instance
101
+ .pop ('I am BoostNavigator from MediaQueryRouteWidget!' ),
102
+ ),
103
+ ]),
104
+ ),
105
+ ]),
110
106
);
111
107
}
112
108
}
0 commit comments