computeDartNavigation function
Implementation
NavigationCollector computeDartNavigation(
ResourceProvider resourceProvider,
NavigationCollector collector,
ParsedUnitResult result,
int? offset,
int? length) {
var dartCollector = _DartNavigationCollector(collector, offset, length);
var unit = result.unit;
var visitor = _DartNavigationComputerVisitor(
resourceProvider: resourceProvider,
computer: dartCollector,
unit: result,
);
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;
}