state method

  1. @protected
FutureOr<S> state()

Implementation

@protected
FutureOr<S> state() async {
  if(_state == null) {
    final completer = Completer<S>();
    _stateCompleters.add(completer);
    return await completer.future;
  }

  return _state!;
}