ObjectKey class

A Key backed by the identity of value; equal only when both keys wrap the identical (identical) object.

Use this when value equality is too coarse — two distinct objects that compare equal by == must still be reconciled as separate children (Flutter's classic example: keying list rows by the model object itself so equal-looking entries stay distinct).

Inheritance

Constructors

ObjectKey(Object? value)
Creates a key that matches on the identity of value.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value Object?
The object this key matches on by identity.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override