Skip to content

Add assist for additional parameters to be named parameters instead of required parameters #53301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jwren opened this issue Aug 21, 2023 · 1 comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-assist Issues with analysis server assists P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@jwren
Copy link
Member

jwren commented Aug 21, 2023

From Flutter IJ issue here, flutter/flutter-intellij#6868:

Currently when I create a class with a final parameter, I have a hint from the IDE to add that field into the constructor. Currently it creates as a simple parameter, such as MyClass(this.myField), and I can also change it to a normal parameter, where it goes into the initialization list.

Since Flutter uses lots of named parameters, it will be very helpful if we could have the option to also have that field being added into the constructor as a named parameter.

@jwren jwren added P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug devexp-assist Issues with analysis server assists labels Aug 21, 2023
@bwilkerson bwilkerson added the legacy-area-analyzer Use area-devexp instead. label Aug 21, 2023
@bwilkerson
Copy link
Member

We still don't have a direct path to create a named parameter, but we do now have an experimental refactoring that will convert a positional parameter into a named parameter.

@bwilkerson bwilkerson added area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. and removed legacy-area-analyzer Use area-devexp instead. labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-assist Issues with analysis server assists P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants