Skip to content

Commit a16595d

Browse files
authored
Change scroll code to make it working also for AnimatedList
AnimatedList is not subclassing from ScrollView, and the seen behaviour was that nativeDriver.state was trying to ensure that a single state is available which is not true for AnimatedList. Regression test was performed on ListView.
1 parent eff8250 commit a16595d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/flutter/adapters/widget_tester_app_driver_adapter.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class WidgetTesterAppDriverAdapter
251251
find.byType(Scrollable),
252252
matchRoot: true,
253253
);
254-
final state = nativeDriver.state(scrollableFinder) as ScrollableState;
254+
final state = nativeDriver.firstState(scrollableFinder) as ScrollableState;
255255
final position = state.position;
256256
position.jumpTo(dy ?? dx ?? 0);
257257

0 commit comments

Comments
 (0)