avoid-duplicate-initializers
preset: recommended
Warns when a final variable has the same initializer as another variable in scope.
Example
❌ Bad:
void fn(SomeClass param) {
final myValue = param.value.isNotEmpty;
final anotherValue = param.value.isNotEmpty; // LINT
}
✅ Good:
void fn(SomeClass param) {
final myValue = param.value.isNotEmpty;
final anotherValue = param.anotherValue;
}