question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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!

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
mit-mitcommented, Feb 22, 2018

+1 for sorting matching types higher!

1reaction
devoncarewcommented, Feb 22, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Named parameters - Rosetta Code
Create a function which takes in a number of arguments which are specified by name rather than (necessarily) position, and show how to...
Read more >
Flutter Error: No named parameter with the name 'displayLarge'
This issue will be raised in all projects using the google_fonts with a caret sign (^). The caret sign (^) is used for...
Read more >
[proposal] non-nullable named parameters required by default
This code won't work in the current NNBD implementation, I need to use the required annotation. Would be cool if the language consider...
Read more >
VS Code tips — Parameter name inlay hints for ... - YouTube
Parameter name inlay hints for JavaScript / TypeScript show parameter names in function calls. This can clear up the meaning of each ...
Read more >
Types and working with parameters - Code With Andrea
Overview and practical use cases of type inference, final & const, named & positional parameters, @required & default values.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found