This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
lib/src/services/completion/dart
test/services/completion/dart Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -361,13 +361,15 @@ class _KeywordVisitor extends GeneralizingAstVisitor<void> {
361
361
}
362
362
if (entity is Token && (entity as Token ).type == TokenType .CLOSE_PAREN ) {
363
363
_addSuggestion (Keyword .COVARIANT );
364
+ _addSuggestion (Keyword .DYNAMIC );
364
365
if (request.featureSet.isEnabled (Feature .non_nullable)) {
365
366
_addSuggestion (Keyword .REQUIRED );
366
367
}
367
368
} else if (entity is FormalParameter ) {
368
369
Token beginToken = (entity as FormalParameter ).beginToken;
369
370
if (beginToken != null && request.target.offset == beginToken.end) {
370
371
_addSuggestion (Keyword .COVARIANT );
372
+ _addSuggestion (Keyword .DYNAMIC );
371
373
if (request.featureSet.isEnabled (Feature .non_nullable)) {
372
374
_addSuggestion (Keyword .REQUIRED );
373
375
}
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ class KeywordContributorTest extends DartCompletionContributorTest {
71
71
}
72
72
73
73
List <Keyword > get constructorParameter {
74
- List <Keyword > keywords = [Keyword .COVARIANT , Keyword .THIS ];
74
+ List <Keyword > keywords = [Keyword .COVARIANT , Keyword .DYNAMIC , Keyword . THIS ];
75
75
if (isEnabled (ExperimentalFeatures .non_nullable)) {
76
76
keywords.add (Keyword .REQUIRED );
77
77
}
@@ -156,7 +156,7 @@ class KeywordContributorTest extends DartCompletionContributorTest {
156
156
}
157
157
158
158
List <Keyword > get methodParameter {
159
- List <Keyword > keywords = [Keyword .COVARIANT ];
159
+ List <Keyword > keywords = [Keyword .COVARIANT , Keyword . DYNAMIC ];
160
160
if (isEnabled (ExperimentalFeatures .non_nullable)) {
161
161
keywords.add (Keyword .REQUIRED );
162
162
}
You can’t perform that action at this time.
0 commit comments