Create an app with a list of items.

Write a test that scrolls through the list.

Run the test.

1. Create an app with a list of items

This recipe builds an app that shows a long list of items.
To keep this recipe focused on testing, use the app created in the
Work with long lists recipe.
If you’re unsure of how to work with long lists,
see that recipe for an introduction.

Add keys to the widgets you want to interact with
inside the integration tests.

2. Write a test that scrolls through the list

Now, you can write a test. In this example, scroll through the list of items and
verify that a particular item exists in the list. The WidgetTester class
provides the scrollUntilVisible() method, which scrolls through a list
until a specific widget is visible. This is useful because the height of the
items in the list can change depending on the device.