File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -103,9 +103,11 @@ void main() {
103
103
.findsOne ();
104
104
}
105
105
106
+ ScrollView findScrollView (WidgetTester tester) =>
107
+ tester.widget <ScrollView >(find.byWidgetPredicate ((w) => w is ScrollView ));
108
+
106
109
ScrollController ? findMessageListScrollController (WidgetTester tester) {
107
- final scrollView = tester.widget <CustomScrollView >(find.byType (CustomScrollView ));
108
- return scrollView.controller;
110
+ return findScrollView (tester).controller;
109
111
}
110
112
111
113
group ('MessageListPage' , () {
@@ -368,7 +370,7 @@ void main() {
368
370
369
371
group ('fetch older messages on scroll' , () {
370
372
int ? itemCount (WidgetTester tester) =>
371
- tester. widget < CustomScrollView >(find. byType ( CustomScrollView ) ).semanticChildCount;
373
+ findScrollView (tester ).semanticChildCount;
372
374
373
375
testWidgets ('basic' , (tester) async {
374
376
await setupMessageListPage (tester, foundOldest: false ,
You can’t perform that action at this time.
0 commit comments