flutter-intellij: Code completing a named parameter doesn't show me the types that could go there

I wonder if we could show all the types of Decoration we have, when trying to code complete decoration: in a Container?

Here’s what we see now:

capture10

Those options aren’t useful, unfortunately. However, since we know that decoration: takes a Decoration, could we show the options for Decoration here? (e.g. BoxDecoration)

I’m still learning the Flutter APIs, and bouncing back and forth between API docs and my IDE is less than efficient. I want to code complete my way to success! 😃

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 36 (19 by maintainers)

Commits related to this issue

Most upvoted comments

+1 for sorting matching types higher!

In this situation, types that match should have a higher relevance than suggestions that do not

This sounds like a pretty elegant solution - we’ll still show all correct suggestions (and allow users to compete through a few expressions to their end goal) but will show the most immediately useful suggestions first.

IMO it’s all about the “relevance” of the suggestion. In this situation, types that match should have a higher relevance than suggestions that do not, and the IDE should display suggestions ranked by the relevance returned by the analysis server… more relevant suggestions first.

https://dart-review.googlesource.com/c/sdk/+/42882

Without the change: image

With the change: image