Fix false positives in "Prefer finals over getters" rule. #57183
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
devexp-linter
Issues with the analyzer's support for the linter package
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
As @zoechi pointed out on #57169, we need to refine our check to ensure we don't flag cases where the field is written to outside a constructor initializer.
In other words, this should produce a lint:
But this should not:
The text was updated successfully, but these errors were encountered: