Equatable mixin
Mixin that provides standard equality and hash code implementation based on properties.
Automatically implements operator == and hashCode based on the props list, eliminating the need for manual implementation in most cases.
Properties
- hashCode → int
-
Overrides the hash code getter to compute hash code based on properties.
no setteroverride
-
props
→ List<
Object?> -
The properties based on which equality and hash code are computed.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool
-
Whether to use a detailed string representation of the object.
no setter
Methods
-
getDiff(
Equatable other) → Map< String, String> - Returns a map of properties that differ between this object and another.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Overrides string representation for debugging and logging.
override
Operators
-
operator ==(
Object other) → bool -
Overrides the equality operator to compare based on the properties.
override