Skip to content

Auto complete on variable destruction can be improved #59854

Open
@FMorschel

Description

@FMorschel

Originally opened at Dart-Code/Dart-Code#5379.


Is your feature request related to a problem? Please describe.
When you have code like this:

void foo(Iterable iterable) {
  if (iterable case List()) {
    
  }
}

When inside List(^) you get prompted by auto-complete for all proprieties the class has. But when you auto-complete, it simply fills the propriety name and not :var isEmpty which is a valid syntax for getting that value (in for in loops you also can do this but the var is then before the Type name). We already have the rename refactor for changing the variable name to a new one if we want to, but I feel like this would help more than harm most of the time.

Describe the solution you'd like
For it to auto-complete with :var before the propriety name (if you know what lints are available maybe we can look at the ones that ask for the final keyword or the type name) on if cases and without the var keyword on for in loops.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-completionIssues with the analysis server's code completion feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions