| Index: pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
|
| diff --git a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
|
| index 01775a3221b3737590a19959907318177ba623e3..59fc1c0e8292a773c0a752bf681e9952601eca12 100644
|
| --- a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
|
| +++ b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
|
| @@ -330,10 +330,17 @@ class ArgListContributor extends DartCompletionContributor {
|
| }
|
|
|
| bool _isFollowedByAComma(DartCompletionRequest request) {
|
| + // new A(^); NO
|
| + // new A(one: 1, ^); NO
|
| + // new A(^ , one: 1); YES
|
| + // new A(^), ... NO
|
| +
|
| + var containingNode = request.target.containingNode;
|
| var entity = request.target.entity;
|
| Token token =
|
| entity is AstNode ? entity.endToken : entity is Token ? entity : null;
|
| - return token?.next?.type == TokenType.COMMA;
|
| + return (token != containingNode?.endToken) &&
|
| + token?.next?.type == TokenType.COMMA;
|
| }
|
|
|
| bool _isInFlutterCreation(DartCompletionRequest request) {
|
|
|