stateOf<T extends StatefulWidget> method
Retrieve the State object by its StatefulWidget. Returns null if not found.
Implementation
State? stateOf<T extends StatefulWidget>() {
State? state;
for (final s in _stateSet.toList().reversed) {
if (s.widget is T) {
state = s;
break;
}
}
return state;
}