resolveFile method

Future<ResolvedUnitResult?> resolveFile(
  1. String filePath
)

Parses a file and returns the resolved AST.

Implementation

Future<ResolvedUnitResult?> resolveFile(String filePath) async {
  final absolutePath = path.absolute(filePath);
  final context = _contextCollection.contextFor(absolutePath);
  final result = await context.currentSession.getResolvedUnit(absolutePath);

  if (result is ResolvedUnitResult) {
    return result;
  }
  return null;
}