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() {
103103 .findsOne ();
104104 }
105105
106+ ScrollView findScrollView (WidgetTester tester) =>
107+ tester.widget <ScrollView >(find.byWidgetPredicate ((w) => w is ScrollView ));
108+
106109 ScrollController ? findMessageListScrollController (WidgetTester tester) {
107- final scrollView = tester.widget <CustomScrollView >(find.byType (CustomScrollView ));
108- return scrollView.controller;
110+ return findScrollView (tester).controller;
109111 }
110112
111113 group ('MessageListPage' , () {
@@ -368,7 +370,7 @@ void main() {
368370
369371 group ('fetch older messages on scroll' , () {
370372 int ? itemCount (WidgetTester tester) =>
371- tester. widget < CustomScrollView >(find. byType ( CustomScrollView ) ).semanticChildCount;
373+ findScrollView (tester ).semanticChildCount;
372374
373375 testWidgets ('basic' , (tester) async {
374376 await setupMessageListPage (tester, foundOldest: false ,
You can’t perform that action at this time.
0 commit comments