I added prefer_const_constructors
linter rule to my analysis_options.yaml
and it found over 500+ issues where const
is missing in my project. Is there any tool that can fix all problems without doing it manually?
Fix all const warning in flutter For stopping this warning mark open analysis_options. yaml and change following rule and save the file. After saving the file it will stop showing warning for missing const keywords in constructor.
To avoid the prefer const with constant constructors warning add this rule prefer_const_constructors : false to the analysis_options. yaml file.
The linter gives you feedback to help you catch potential errors and keep your code in line with the published Dart Style Guide. Enforceable lint rules (or "lints") are cataloged here and can be configured via an analysis options file.
Try using this in your .vscode/settings.json
to solve all lints of the file on saving
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