@@ -85,9 +85,8 @@ void main() {
85
85
);
86
86
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/44572
87
87
88
-
89
88
testWidgets ('Custom Padding' , (WidgetTester tester) async {
90
- const EdgeInsets customPadding = EdgeInsets .all (10 );
89
+ const EdgeInsets customPadding = EdgeInsets .all (10 );
91
90
await tester.pumpWidget (
92
91
MaterialApp (
93
92
theme: ThemeData .from (colorScheme: const ColorScheme .light ()),
@@ -98,10 +97,10 @@ void main() {
98
97
alignment: Alignment .bottomCenter,
99
98
child: BottomAppBar (
100
99
padding: customPadding,
101
- child: ColoredBox (
102
- color: Colors .green,
103
- child: SizedBox (width: 300 , height: 60 ),
104
- ),
100
+ child: ColoredBox (
101
+ color: Colors .green,
102
+ child: SizedBox (width: 300 , height: 60 ),
103
+ ),
105
104
),
106
105
),
107
106
);
@@ -112,14 +111,14 @@ void main() {
112
111
113
112
final BottomAppBar bottomAppBar = tester.widget (find.byType (BottomAppBar ));
114
113
expect (bottomAppBar.padding, customPadding);
115
- final Rect babRect = tester.getRect (find.byType (BottomAppBar ));
116
- final Rect childRect = tester.getRect (find.byType (ColoredBox ));
114
+ final Rect babRect = tester.getRect (find.byType (BottomAppBar ));
115
+ final Rect childRect = tester.getRect (find.byType (ColoredBox ));
117
116
expect (childRect, const Rect .fromLTRB (250 , 530 , 550 , 590 ));
118
117
expect (babRect, const Rect .fromLTRB (240 , 520 , 560 , 600 ));
119
118
});
120
119
121
120
testWidgets ('Custom Padding in Material 3' , (WidgetTester tester) async {
122
- const EdgeInsets customPadding = EdgeInsets .all (10 );
121
+ const EdgeInsets customPadding = EdgeInsets .all (10 );
123
122
await tester.pumpWidget (
124
123
MaterialApp (
125
124
theme: ThemeData .from (colorScheme: const ColorScheme .light (), useMaterial3: true ),
@@ -130,10 +129,10 @@ void main() {
130
129
alignment: Alignment .bottomCenter,
131
130
child: BottomAppBar (
132
131
padding: customPadding,
133
- child: ColoredBox (
134
- color: Colors .green,
135
- child: SizedBox (width: 300 , height: 60 ),
136
- ),
132
+ child: ColoredBox (
133
+ color: Colors .green,
134
+ child: SizedBox (width: 300 , height: 60 ),
135
+ ),
137
136
),
138
137
),
139
138
);
@@ -144,8 +143,8 @@ void main() {
144
143
145
144
final BottomAppBar bottomAppBar = tester.widget (find.byType (BottomAppBar ));
146
145
expect (bottomAppBar.padding, customPadding);
147
- final Rect babRect = tester.getRect (find.byType (BottomAppBar ));
148
- final Rect childRect = tester.getRect (find.byType (ColoredBox ));
146
+ final Rect babRect = tester.getRect (find.byType (BottomAppBar ));
147
+ final Rect childRect = tester.getRect (find.byType (ColoredBox ));
149
148
expect (childRect, const Rect .fromLTRB (250 , 530 , 550 , 590 ));
150
149
expect (babRect, const Rect .fromLTRB (240 , 520 , 560 , 600 ));
151
150
});
0 commit comments