DVForwardingMediaSignal<T> class final

A signal that reads whichever signal it currently points at.

What lets DVBox.video(source).controller be taken before the box is mounted, and still read the player the mounted box ends up driving: the reader holds this, and the runtime moves what it points at.

Subscribes to its target only while something listens to it. A box rebuilt by its parent makes a new handle every build; if each handle subscribed on construction, the player would carry one more subscription per rebuild for as long as it played.

Implemented types
Available extensions

Constructors

DVForwardingMediaSignal(DVMediaSignal<T> target)

Properties

changes → Stream<T>
Every change. Does not replay the current value; read value for that.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → T
The current value.
no setteroverride

Methods

close() → Future<void>
listen(void onValue(T value)) → StreamSubscription<T>
Observes changes. Cancel the returned subscription to stop.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read() → T
The current value. Present so reads look like every other signal.
override
retarget(DVMediaSignal<T> target) → void
Points this signal at target. A listener sees the new target's value when it differs from the old one's.
toString() → String
A string representation of this object.
inherited
watch(BuildContext context) → T

Available on DVMediaSignal<T>, provided by the DVMediaSignalWatch extension

The current value, rebuilding the reading element when it changes.

Operators

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