getAPIRootStarted method

FutureOr<A> getAPIRootStarted()

Returns the APIRoot instance started. See getAPIRoot and start.

Implementation

FutureOr<A> getAPIRootStarted() {
  if (isStarted) {
    return getAPIRoot();
  }

  return start().resolveMapped((ok) {
    if (!ok) {
      throw StateError("Error starting.");
    }
    return getAPIRoot();
  });
}