Target<T> class

Resolves to the nearest ancestor implementing T.

Built once, where the host is constructed, and read wherever it is needed:

late final _target = Target<AngleOwner>(this);

AngleOwner get target => _target.value;

The host resolves it on mount and drops it whenever its ancestry changes, so a node moved under a new parent finds the new one on its next read.

A nullable T makes the ancestor optional: value is null while the host is unmounted or has no such ancestor, instead of throwing.

Implementers

Constructors

Target(Node host)

Properties

hashCode → int
The hash code for this object.
no setterinherited
host → Node
The node this target resolves from.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → T
The nearest ancestor implementing T.
no setter

Methods

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

Operators

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