Index: pkg/analysis_server/lib/src/services/correction/assist_internal.dart |
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart |
index 244fb3d16bd9d4dc44d6e1246007fb9bb771c0fe..f58469d036c2709916a1b8704125cde9e7601300 100644 |
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart |
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart |
@@ -338,7 +338,7 @@ class AssistProcessor { |
} |
// add edit |
Token keyword = declarationList.keyword; |
- if (keyword.keyword == Keyword.VAR) { |
+ if (keyword?.keyword == Keyword.VAR) { |
SourceRange range = rangeToken(keyword); |
_addReplaceEdit(range, typeSource); |
} else { |