futureOr property

FutureOr<T> get futureOr

Returns the stored synchronous value if available, otherwise returns the Future that resolves to the value.

If the CompleterOr has been completed with a synchronous value, that value is returned directly. Otherwise, the Future is returned.

Implementation

FutureOr<T> get futureOr {
  return _value ?? _completer.future;
}