add-equatable-props
Warns when a class inherits Equatable but is missing the props getter.
Example
❌ Bad:
// LINT: This class inherits Equatable, but is missing the 'props' getter. Try adding it.
final class Child extends Parent {
final int y;
Child({required this.y});
}
sealed class Parent with EquatableMixin {
List<Object?> get props => [];
Parent();
}
✅ Good:
final class Child extends Parent {
final int y;
Child({required this.y});
List<Object?> get props => [...super.props, y];
}
sealed class Parent with EquatableMixin {
List<Object?> get props => [];
Parent();
}