stream property
A broadcast stream of value changes.
The stream emits whenever emit is called with a different value. This is useful for reactive programming patterns:
count.stream
.where((val) => val > 10)
.listen((val) => print('Count exceeded 10: $val'));
Implementation
Stream<T> get stream {
_streamController ??= StreamController<T>.broadcast();
return _streamController!.stream;
}