I am trying to scroll and find widget from the GridView in integration testing
in flutter. But the code not working:
tester.scrollUntilVisible(itemFinder, -100, scrollable: gridViewFinder)
But this is not working. It is saying GridView is not scrollable.
There are few steps I made mistake here:
scrollUntilVisible
() is Future
, so
await tester.scrollUntilVisible(...);
to scroll down, delta should be positive:
await tester.scrollUntilVisible(itemFinder, 100.0, ...);
if there is only one list in screen, I don't have to include scrollable:
await tester.scrollUntilVisible(itemFinder, 100.0);
Now done! Final answer:
await tester.scrollUntilVisible(itemFinder, 100.0);