Issue
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.
Solution
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);
Answered By - Khamidjon Khamidov
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.