stream property

Stream<T> get stream

Converts this reactive value to a broadcast stream.

Emits values whenever the reactive value changes. Multiple listeners can subscribe. Automatically cleaned up when disposed.

Returns: A broadcast stream of value changes

Example:

final counter = Signal(0);
counter.stream.listen((value) => print('Counter: $value'));
counter.value = 1; // Prints: "Counter: 1"

Implementation

Stream<T> get stream => JoltStreamHelper.getStream(this);