From 34aab1f3fb0e8e91df5828f8aa5b380b26d699ff Mon Sep 17 00:00:00 2001 From: Dmitry Zhifarsky Date: Thu, 13 Oct 2022 21:43:58 +0400 Subject: [PATCH] fix: stop plugin flickering --- lib/src/analyzer_plugin/analyzer_plugin.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/analyzer_plugin/analyzer_plugin.dart b/lib/src/analyzer_plugin/analyzer_plugin.dart index 23129b2424..7edc407a5a 100644 --- a/lib/src/analyzer_plugin/analyzer_plugin.dart +++ b/lib/src/analyzer_plugin/analyzer_plugin.dart @@ -56,6 +56,11 @@ class AnalyzerPlugin extends ServerPlugin { required AnalysisContext analysisContext, required String path, }) async { + final isAnalyzed = analysisContext.contextRoot.isAnalyzed(path); + if (!isAnalyzed) { + return; + } + try { final resolvedUnit = await analysisContext.currentSession.getResolvedUnit(path);