ComputedValueNotifier<T> constructor
ComputedValueNotifier<T> ({
- required Listenable listenable,
- required T compute(),
Computed value based on another listenable
Implementation
ComputedValueNotifier({
required Listenable listenable,
required T Function() compute,
}) : _listenable = listenable,
_compute = compute,
_value = compute() {
_listenable.addListener(_updateValue);
}