value property
The current value stored in this notifier.
When the value is replaced with something that is not equal to the old value as evaluated by the equality operator ==, this class notifies its listeners.
Implementation
@override
T get value {
// Automatically track when value is accessed within an ZenObserver widget
RxTracking.track(this);
return super.value;
}
Implementation
@override
set value(T newValue) {
if (super.value == newValue) return;
if (!_hasBatchBaseline) {
_batchBaselineValue = super.value;
_hasBatchBaseline = true;
}
// ValueNotifier.value= updates backing field and calls notifyListeners(),
// which performs mark-phase dirtying + batch scheduling below.
super.value = newValue;
}