ComputedSignal<T, V> class

A read-only signal whose value is derived from another signal.

Use this when you need a computed/derived value from a signal that lives in the same node, without the verbosity of TransformBridgeSignal.

late final total = registerSignal(
  ComputedSignal(products, (list) => list.fold<double>(
    0.0, (prev, e) => prev + e.price,
  )),
);
Inheritance

Constructors

ComputedSignal(BaseSignal<T> _source, V _transform(T))

Properties

attachedNode Node
latefinalinherited
controller StreamController<V>
finalinherited
hashCode int
The hash code for this object.
no setterinherited
readable ReadableSignal<V>
Readable proxy for use with generated Readable* classes.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<V>
no setterinherited
streamTriggerImmediatly Stream<V>
no setterinherited
unsafeValue ↔ V
getter/setter pairinherited
value → V
no setterinherited

Methods

dispose() → void
override
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