Skip to content
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

Add in const using "Fix All" #89855

Closed
tadaspetra opened this issue Sep 10, 2021 · 9 comments
Closed

Add in const using "Fix All" #89855

tadaspetra opened this issue Sep 10, 2021 · 9 comments
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter r: fixed Issue is closed as already fixed in a newer version tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@tadaspetra
Copy link
Contributor

Use case

With the default linter now hinting for const to be used, being able to add all the missing const keywords using Fix All would be very convenient. And then developers can even have it Fix All on save and add in all the const keywords quickly.

Proposal

Add const using "Fix All" feature

@danagbemava-nc danagbemava-nc added the in triage Presently being triaged by the triage team label Sep 10, 2021
@danagbemava-nc
Copy link
Member

@tadaspetra in what way are you proposing that the "fix all" be added?

Is it with the dart fix command or through a different means?

@danagbemava-nc danagbemava-nc added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 10, 2021
@tadaspetra
Copy link
Contributor Author

In Flutter 2.5 there was a Fix All added to VSCode. Dart-Code/Dart-Code#3445

I believe it uses dart fix under the hood, and updates some deprecated code, as well as lots of other things.

It would be great if adding in const was another thing it fixed

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 10, 2021
@danagbemava-nc
Copy link
Member

This might have to be filed on either the dart repo or the dart-code repo.

However, as I am not certain, I will label for visibility.

I do think that'll be helpful.

@danagbemava-nc danagbemava-nc added passed first triage c: proposal A detailed proposal for a change to Flutter c: new feature Nothing broken; request for a new capability tool Affects the "flutter" command-line tool. See also t: labels. and removed in triage Presently being triaged by the triage team labels Sep 10, 2021
@bernaferrari
Copy link
Contributor

This is known, there are some bugs on it and people are already working on it. There should be an issue in dart sdk repo, but I don't have the link here.

@techno-disaster
Copy link

techno-disaster commented Nov 9, 2021

If I'm not wrong this is fixed in dart 2.15 here so flutter channel master && flutter upgrade && dart fix --apply should fix it?

@danagbemava-nc
Copy link
Member

Hi @tadaspetra, can you confirm if this has been fixed on the master channel?

@danagbemava-nc danagbemava-nc added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 10, 2021
@bernaferrari
Copy link
Contributor

That was merged 15 days ago. Flutter dev hasn't been updated for 8 weeks. You need to wait a few more weeks but you should close this issue.

@danagbemava-nc
Copy link
Member

Since this issue was initially supposed to be on the dart-lang/sdk repo and a fix seems to have been applied on master as per this comment, I feel it is safe to close the issue.

Closing as fixed.
If you run into any issues with this, kindly consider filing an issue over at the dart-lang/sdk repo, as this is beyond the scope of the flutter tool.

Thank you

@danagbemava-nc danagbemava-nc added r: fixed Issue is closed as already fixed in a newer version and removed waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels Nov 11, 2021
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter r: fixed Issue is closed as already fixed in a newer version tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

4 participants