equatable library


A class that helps implement equality without needing to explicitly override == and hashCode. Equatables override their own == and hashCode based on the provided properties.


You must define the EquatableMixin on the class which you want to make Equatable and the class must also be a descendent of EquatableMixinBase. EquatableMixin does the override of the == operator as well as hashCode.
You must define the EquatableMixinBase on the class which you want to make Equatable. class EquatableDateTime extends DateTime with EquatableMixinBase, EquatableMixin { ... } This exposes the props getter which can then be overridden to include custom props in subclasses. The props getter is used to override == and hashCode in the EquatableMixin.