dart-code-metrics
dart-code-metrics copied to clipboard
[Rule change] Add const keyword to "prefer-correct-edge-insets-constructor" rule
So the EdgeInset rule is great and it even has an autofix, I would just suggest that we add the "const" keyword when applying the auto-fix as it is a recommended good practice : https://dart-lang.github.io/linter/lints/prefer_const_constructors.html.
Currently we have to do two steps to reach a "valid" code when basic lint rules are applied :
- Apply EdgeInset auto-fix
- Apply Flutter lints const constructor auto-fix
From what I see in the code it seems pretty easy to add this in the rule's validator file and I could propose the associated PR but I just don't want to miss something here.
@orevial hi, yeah, that would be a great improvement! If you want to contribute, we'd really appreciate that
Available in 4.18.0 🚀