result property

CompletableFutureResult<T> get result

The result of this CompletableFuture.

Trying to get the result, while isCompleted is false will throw a StateError.

Implementation

CompletableFutureResult<T> get result {
  if (!isCompleted)
    throw StateError("This CompletableFuture is not completed");
  return _result!;
}