equatable 3.0.0-dev.1 copy "equatable: ^3.0.0-dev.1" to clipboard
equatable: ^3.0.0-dev.1 copied to clipboard

A Dart package that helps to implement value based equality without needing to explicitly override == and hashCode.

example/main.dart

// 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
}
3192
likes
150
pub points
100%
popularity

Publisher

verified publisherfluttercommunity.dev

A Dart package that helps to implement value based equality without needing to explicitly override == and hashCode.

Repository (GitHub)
View/report issues
Contributing

Topics

#equality #equals #macros

Documentation

Documentation
API reference

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

collection, macros

More

Packages that depend on equatable