reload method

Future<void> reload()

Reloads path-dependency sources into the memory overlay and notifies every analysis context.

The analyzer creates a separate context per includedPaths root. Calling AnalysisContextCollection.contextFor only updates the first matching context (usually the dependency package). Route analysis runs in the app context, which would otherwise keep a stale file state for the same path — so local path-dep edits never show up until a full restart.

Implementation

Future<void> reload() async {
  final root = _root;
  if (root == null) {
    throw Exception('No root found');
  }

  await refreshDependencies();
}