equatable 3.0.0-dev.0 equatable: ^3.0.0-dev.0 copied to clipboard
A Dart package that helps to implement value based equality without needing to explicitly override == and hashCode.
// ignore_for_file: avoid_print
import 'package:equatable/equatable.dart';
@Equatable()
class Person {
Person({required this.name});
final String name;
}
void main() {
print(Person(name: 'Dash') == Person(name: 'Dash')); // true
print(Person(name: 'Dash') == Person(name: 'Sparky')); // false
}