ComputedObservable<T> constructor
ComputedObservable<T> (
- ComputeFunction<
T> _compute, - List<
Observable> _dependencies
Creates a new ComputedObservable with the provided compute function and dependencies.
The compute function is called initially and every time any of the dependencies change.
Implementation
ComputedObservable(this._compute, this._dependencies) : super(_compute()) {
for (final dep in _dependencies) {
dep.addListener(_updateValue);
}
}