Index: pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart |
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart |
index 0cf93185d9de6a66d3f6ed5f751a3befd8125e7a..d535ef4b27ac57c4245c9e211a5c32a8ef261e43 100644 |
--- a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart |
+++ b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart |
@@ -331,6 +331,15 @@ class _SuggestionBuilder { |
} |
} |
String identifier = element.displayName; |
+ |
+ if (relevance == DART_RELEVANCE_DEFAULT && identifier != null) { |
+ // Decrease relevance of suggestions starting with $ |
+ // https://github.com/dart-lang/sdk/issues/27303 |
+ if (identifier.startsWith(r'$')) { |
+ relevance = DART_RELEVANCE_LOW; |
+ } |
+ } |
+ |
int alreadyGenerated = _completionTypesGenerated.putIfAbsent( |
identifier, () => _COMPLETION_TYPE_NONE); |
if (element is MethodElement) { |