The first matching state according to a depth-first pre-order traversal of the widget tree.
Throws a StateError if finder
is empty or if the first
matching widget has no state.
- Use state if you only expect to match one state.
Source
State/*=T*/ firstState/*<T extends State>*/(Finder finder) { TestAsyncUtils.guardSync(); return _stateOf/*<T>*/(finder.evaluate().first, finder); }