roots property

FutureOr<List<Root>> get roots

All known workspace Roots from the last call to listRoots.

May be a Future if we are currently requesting the roots.

Implementation

FutureOr<List<Root>> get roots => switch (_rootsState) {
  _RootsState.upToDate => _roots!,
  _RootsState.pending => _rootsCompleter!.future,
};