@@ -161,14 +161,27 @@ void main() {
161
161
));
162
162
await tester.pumpAndSettle ();
163
163
164
+ // In the tests below the number of RepaintBoundary widgets depends on:
165
+ // ModalRoute - builds 2
166
+ // GlowingOverscrollIndicator - builds 2
167
+ // TwoDimensionalChildListDelegate - builds 1 unless addRepaintBoundaries is false
168
+
169
+ void expectModalRoute () {
170
+ expect (ModalRoute .of (tester.element (find.byType (SimpleListTableViewport ))), isA <MaterialPageRoute <void >>());
171
+ }
172
+
164
173
switch (defaultTargetPlatform) {
165
- case TargetPlatform .android:
166
174
case TargetPlatform .fuchsia:
175
+ expectModalRoute ();
176
+ expect (find.byType (GlowingOverscrollIndicator ), findsNWidgets (2 ));
167
177
expect (find.byType (RepaintBoundary ), findsNWidgets (7 ));
178
+
179
+ case TargetPlatform .android:
168
180
case TargetPlatform .iOS:
169
181
case TargetPlatform .linux:
170
182
case TargetPlatform .macOS:
171
183
case TargetPlatform .windows:
184
+ expectModalRoute ();
172
185
expect (find.byType (RepaintBoundary ), findsNWidgets (3 ));
173
186
}
174
187
@@ -183,13 +196,17 @@ void main() {
183
196
await tester.pumpAndSettle ();
184
197
185
198
switch (defaultTargetPlatform) {
186
- case TargetPlatform .android:
187
199
case TargetPlatform .fuchsia:
200
+ expectModalRoute ();
201
+ expect (find.byType (GlowingOverscrollIndicator ), findsNWidgets (2 ));
188
202
expect (find.byType (RepaintBoundary ), findsNWidgets (6 ));
203
+
204
+ case TargetPlatform .android:
189
205
case TargetPlatform .iOS:
190
206
case TargetPlatform .linux:
191
207
case TargetPlatform .macOS:
192
208
case TargetPlatform .windows:
209
+ expectModalRoute ();
193
210
expect (find.byType (RepaintBoundary ), findsNWidgets (2 ));
194
211
}
195
212
}, variant: TargetPlatformVariant .all ());
0 commit comments