requiredState<S extends State<StatefulWidget> > method
Implementation
@Deprecated('Will be removed')
Future<S> requiredState<S extends State>() => requiredContext.then((value) {
if (value is StatefulElement && value.state is S) {
return value.state as S;
}
return Future<S>.value(value.findAncestorStateOfType<S>());
});