ObservableView<T>.fromStream constructor
ObservableView<T>.fromStream (
- Stream<
T> stream, { - T? initialValue,
An ObservableView of the most-recently-published value on the given
stream
.
Implementation
factory ObservableView.fromStream(Stream<T> stream, {T? initialValue}) {
var instance = ObservableReference(initialValue);
instance.listen(stream);
return instance as ObservableView<T>;
//return ObservableReference(initialValue)..listen(stream);
}