In an app update, we changed a nullable boolean from nullable to default to false.
@override
bool hasChanged() {
final diff = changeTracker.diff(appFormCheck);
return diff != null;
}
Now the code has hundreds of the old line above with various forms causing all sorts of bugs.
The operand can’t be null, so the condition is always ‘true’.
The linter knows about them but How to make those an error ?
I tried
linter:
rules:
- avoid_null_checks_in_equality_operators
But it does not raise errors