Skip to main content

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

outdated

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
}
3.64k
likes
0
points
7.79M
downloads

Documentation

Documentation

Publisher

verified publisherfluttercommunity.dev

Weekly Downloads

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 #macros

Funding

Consider supporting this project:

github.com

License

unknown (license)

Dependencies

collection, macros

More

Packages that depend on equatable