EqualityKey class

Override the generation behavior of a field

  • Annotations on constructor parameters take precedence over fields
  • Annotations on fields are inherited in subclasses, while those on parameters are not
Annotations
  • @Target.new({TargetKind.field, TargetKind.parameter, TargetKind.optionalParameter, TargetKind.getter, TargetKind.overridableMember})

Constructors

EqualityKey({bool? inHash, bool? inEquals})
Use EqualityKey.exclude
const
EqualityKey.exclude([bool exclude = true])
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
inEquals → bool
If false, the field will not be included in the == method
final
inHash → bool
If false, the field will not be included in the hash method
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited