An introduction to widget testing

Handle scrolling

Find widgets

Cookbook

Testing

Widget

Find widgets

1. Find a Text widget

2. Find a widget with a specific Key

3. Find a specific widget instance

Summary

Complete example

To locate widgets in a test environment, use the Finder
classes. While it’s possible to write your own Finder classes,
it’s generally more convenient to locate widgets using the tools
provided by the flutter_test package.

During a flutter run session on a widget test, you can also
interactively tap parts of the screen for the Flutter tool to
print the suggested Finder.