stateList<T extends State<StatefulWidget> > method
- FinderBase<
Element> finder
The matching states in the widget tree.
Throws a StateError if any of the elements in finder
match a widget
that has no state.
- Use state if you only expect to match one state.
- Use firstState if you expect to match several but only want the first.
Implementation
Iterable<T> stateList<T extends State>(finders.FinderBase<Element> finder) {
TestAsyncUtils.guardSync();
return finder.evaluate().map<T>((Element element) => _stateOf<T>(element, finder));
}