analyzeFile method
Future<void>
analyzeFile({
- required AnalysisContext analysisContext,
- required String path,
override
Analyzes the given file.
Implementation
@override
Future<void> analyzeFile({
required AnalysisContext analysisContext,
required String path,
}) async {
// Retrieve the resolved unit result for the file.
final result = await analysisContext.currentSession.getResolvedUnit(path);
if (result is ResolvedUnitResult) {
// Generate inline hints for the resolved unit.
final hints = _generateInlineHints(result.unit);
// Send the hints to the IDE.
channel.sendNotification(
plugin.AnalysisHighlightsParams(path, hints).toNotification(),
);
}
}