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.

Offer code assist for constructing new arguments

See original GitHub issue

The autocomplete to fill in the <Widget>[] list literal on children parameters is super awesome.

I wonder if we can apply it to all parameters by checking against the analyzer.

Consider I’m starting to type

return new PageRouteBuilder(
  pageBuilder: <highlight>pageBuilder</highlight>
)

Now it’s a huge pain to actually fill out my selected value with a new instance of what pageBuilder the parameter wants unless I already have an instance.

Would be nice for the code assist on the selected string to offer the construction of the type the parameter wants. In this case, a function with a long list of input parameters that would autocomplete to:

return new PageRouteBuilder(
  pageBuilder: (BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation) {
    return <highlight></highlight>
  },
)

Here the parameter takes a function that can only be constructed one way but it would be nice for the code assist to offer all the constructors.

So on a children parameter, it can offer a <Widget> list literal or offer new List, new List.filled, new List.from etc from all the factories correctly parametrized.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bwilkersoncommented, Feb 22, 2018
0reactions
DanTupcommented, May 3, 2018

Closing this since I think it’s all analyzer work (https://github.com/dart-lang/sdk/issues/31885). We can revisit if anything gets implemented that needs additional support in Dart Code though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

9 Best AI-Powered Code Completion for Productive ...
This all-language code completion assistant constantly learns the codes, patterns, and preferences of your team and, as a result, offers business-level ...
Read more >
Code completion | PyCharm Documentation - JetBrains
Statement completion. You can create syntactically correct code constructs by using statement completion Ctrl+Shift+Enter .
Read more >
IntelliSense in Visual Studio Code
IntelliSense. IntelliSense is a general term for various code editing features including: code completion, parameter info, quick info, and member lists.
Read more >
Federal Circuit: PTAB Claim Construction Arguments
The Court explained that the forfeiture doctrine does not “preclude a party from proffering additional or new supporting arguments, based on ...
Read more >
Visual Studio IntelliCode - Microsoft
Assisted IntelliSense – C# · Team Completions · Argument Completion · Inferring code style and formatting conventions.
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