@@ -161,14 +161,27 @@ void main() {
161161 ));
162162 await tester.pumpAndSettle ();
163163
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+
164173 switch (defaultTargetPlatform) {
165- case TargetPlatform .android:
166174 case TargetPlatform .fuchsia:
175+ expectModalRoute ();
176+ expect (find.byType (GlowingOverscrollIndicator ), findsNWidgets (2 ));
167177 expect (find.byType (RepaintBoundary ), findsNWidgets (7 ));
178+
179+ case TargetPlatform .android:
168180 case TargetPlatform .iOS:
169181 case TargetPlatform .linux:
170182 case TargetPlatform .macOS:
171183 case TargetPlatform .windows:
184+ expectModalRoute ();
172185 expect (find.byType (RepaintBoundary ), findsNWidgets (3 ));
173186 }
174187
@@ -183,13 +196,17 @@ void main() {
183196 await tester.pumpAndSettle ();
184197
185198 switch (defaultTargetPlatform) {
186- case TargetPlatform .android:
187199 case TargetPlatform .fuchsia:
200+ expectModalRoute ();
201+ expect (find.byType (GlowingOverscrollIndicator ), findsNWidgets (2 ));
188202 expect (find.byType (RepaintBoundary ), findsNWidgets (6 ));
203+
204+ case TargetPlatform .android:
189205 case TargetPlatform .iOS:
190206 case TargetPlatform .linux:
191207 case TargetPlatform .macOS:
192208 case TargetPlatform .windows:
209+ expectModalRoute ();
193210 expect (find.byType (RepaintBoundary ), findsNWidgets (2 ));
194211 }
195212 }, variant: TargetPlatformVariant .all ());
0 commit comments