Skip to content

Extension methods are shown too high in the list of autocomplete suggestions #45058

@jacob314

Description

@jacob314

Extension methods are now sometimes shown before regular methods in the list of autocompletes.
Extension methods should be shown after all regular methods because it is easy for popular classes to end up with a lot of rarely used extension methods. Showing all these extension methods before regular members makes it hard to see the true shape of the class versus the shape of all the extensions. Using different icons for extension methods in the autocomplete list would also help clarify what completions are extensions and what are normal.

Example autocompletes for a BuildContext (commonly used Flutter framework base class). Notice that watch() is just an extension method from package:provider that is in scope because my file uses package:provider
image

Fyi @Hixie for thoughts on reducing the risk of extension methods cluttering Flutter apis.

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 featuretype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions