ValueEmitter<T>.reactive constructor

ValueEmitter<T>.reactive(
  1. {List<ChangeEmitter<Change>> reactTo,
  2. T withValue(
      ),
    1. bool emitDetailedChanges = false}
    )

    A ValueEmitter that reacts to changes from a list of ChangeEmitters and calls a builder function to get its new value.

    Implementation

    ValueEmitter.reactive(
        {List<ChangeEmitter> reactTo,
        T Function() withValue,
        this.emitDetailedChanges = false})
        : _isUnmodifiableView = true,
          super(useSyncronousStream: true) {
      _setValueWithoutUnmodifiableCheck(withValue());
      _sub = StreamGroup.merge(reactTo.map((e) => e.changes))
          .listen((_) => _setValueWithoutUnmodifiableCheck(withValue()));
    }