Skip to content

Code completion ordering is wrong when autoImportCompletions is enabled #1742

@maRci002

Description

@maRci002
  • VSCode Version
    1.34.0

  • OS Version:
    Windows 10

  • Extensions:
    - Dart 3.0.2
    - Flutter 3.0.2

  • Language
    Dart

My problem is that when a constructor (let's say new ListView.builder(...)) waits for specific type of arguments then the IDE should consider type matching while using autocomplete feature.

Here's a simplified example of this issue, the padding argument shoud implemet EdgeInsetsGeometry abstract class but autocomplete shows me random methods / keywords...:
VS code autocomplete

I think the IDE is smart enough to know there are some classes which implement EdgeInsetsGeometry abstract class like: class EdgeInsets extends EdgeInsetsGeometry and should offer them as first results.

I don't know maybe the autocomplete results come from Dart analysis server and not related to VSCode at all. I tried to make some changes in the Settings.json but no success, even I tried the original recommended settings.

However in Android Studio everything works is fine, I hope this behavior can be implemented in VSCode too 👌
Android Studio autocomplete

I would like to mention in Android Studio autocomplete is 2x times faster than in VSCode, but this is not related to this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions