equatable 3.0.0-dev.0 copy "equatable: ^3.0.0-dev.0" to clipboard
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.

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
}
3207
likes
0
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

Topics

#equality #equals

Documentation

Documentation

Funding

Consider supporting this project:

github.com

License

unknown (license)

Dependencies

collection, macros

More

Packages that depend on equatable