computeDartNavigation function
Implementation
NavigationCollector computeDartNavigation(
ResourceProvider resourceProvider,
NavigationCollector collector,
CompilationUnit unit,
int? offset,
int? length) {
var dartCollector = _DartNavigationCollector(collector, offset, length);
var visitor = _DartNavigationComputerVisitor(resourceProvider, dartCollector);
if (offset == null || length == null) {
unit.accept(visitor);
} else {
var node = _getNodeForRange(unit, offset, length);
if (node != null) {
node = _getNavigationTargetNode(node);
}
node?.accept(visitor);
}
return collector;
}