Imagine you have a project with thousands of lint warnings after you set up analysis_options.yaml file properly. And now you need to fix all of the mess you have. Doing it all by hand can cost you a lot of time, while most of the issues are very simple like "var" instead of "final", double quotes instead of single, etc.
Is there any way to make Android Studio automatically fix all of the easiest lint warnings like "Prefer const with constant constructors", etc. in terminal or by running any specific command?
first within the project do : dart fix --dry-run then after it finish use : dart fix --apply
In Android Studio in the top Menu use
"Analyze" -> "Code Cleanup"
If that doesn't fix it you have to go manually through the result of
"Analyze" -> "inspect code"
See https://developer.android.com/studio/write/lint#manuallyRunInspections
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With