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.
Source
Iterable<State/*=T*/> stateList/*<T extends State>*/(Finder finder) {
TestAsyncUtils.guardSync();
return finder.evaluate().map((Element element) => _stateOf/*<T>*/(element, finder));
}