value property

T value

returns the current value for this observable

Implementation

T get value {
  // if we have a RxBuilder accessing to the current value
  // we add a listener for that Widget
  if (RxNotifier.proxy != null) {
    RxNotifier.proxy!.addListener(this);
  }
  return _value;
}
void value=(T newValue)

update the value and add a event sink to the StreamController

Implementation

set value(T newValue) {
  if (_value != newValue) {
    _value = newValue;
    controller.sink.add(_value);
  }
}