avoid-assignments-as-conditions
Warns when an assignment is used inside a condition.
Example
❌ Bad:
void fn(List<String> values) {
bool? flag;
if (flag ??= values.isEmpty) {} // LINT
if (flag = values.isEmpty) {} // LINT
}
✅ Good:
void fn(List<String> values) {
bool? flag;
flag ??= values.isEmpty;
if (flag) {
...
}
}