Ref class final

A reference to a normalized entity, stored in place of the object itself.

Entity keys look like Launch:launch-181 (__typename:id, see Normalization.identify). A Ref may also be used as the first element of a read/write path to address an entity directly instead of walking from the operation root.

Serialized as {"__ref": "<key>"} in Cache.snapshot.

Constructors

Ref(String key)
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
key → String
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.
override

Operators

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

Static Methods

tryParse(Object? json) → Ref?

Constants

jsonKey → const String