resolveFuture property

Future? get resolveFuture

Resolves the actual Future that will define this node content.

Implementation

Future? get resolveFuture {
  if (_resolvedFuture != null) return _resolvedFuture;

  final future = this.future;
  if (future != null) {
    _resolvedFuture = future;
  } else {
    final function = this.function;
    if (function != null) {
      _resolvedFuture = function();
    } else {
      throw StateError("Can't resolve Future: null `future` and `function`!");
    }
  }

  return _resolvedFuture;
}