ValueChangeNotifier<T> class

A value notifier class that notifies listeners of changes.

Implemented types
Mixed-in types
Available extensions

Constructors

ValueChangeNotifier(T _value)
Constructs a ValueChangeNotifier with an initial value.

Properties

bound ValueBound<T>?
The bound object.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether the object has listeners.
no setterinherited
isBound bool
Whether the notifier is bound to another value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value ↔ T
The current value stored in this notifier.
getter/setter pairoverride

Methods

addChangeListener(ValueChangeListener<T> listener) → void
Adds a listener to be notified of changes.
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
override
biDirectionalBind(ValueNotifier<T> source) → void
Binds the notifier to the source bidirectionally.
defaultAddListener(ChangeListener listener) → void
Add a listener to the list of listeners.
inherited
defaultNotifyListeners(Object? event) → void
Notify all the listeners.
inherited
defaultRemoveListener(ChangeListener listener) → void
Remove a listener from the list of listeners.
inherited
dispose() → void
Disposes the object making it unusable for further operations and releasing the resources.
inherited
map<R>(R mapper(T value)) ValueListenable<R>

Available on ValueChangeNotifier<T>, provided by the ValueChangeNotifierExtension extension

Maps the value of the ValueChangeNotifier to a new value.
map<R>(R mapper(T value)) ValueListenable<R>

Available on ValueListenable<T>, provided by the ValueListenableExtension extension

Returns a read-only view of the ValueListenable.
map<R>(R mapper(T value)) ValueListenable<R>

Available on ValueNotifier<T>, provided by the ValueNotifierExtension extension

Maps the value of the ValueNotifier to a new value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
override
readOnly() ValueListenable<T>

Available on ValueChangeNotifier<T>, provided by the ValueChangeNotifierExtension extension

Returns a read-only view of the ValueChangeNotifier.
readOnly() ValueListenable<T>

Available on ValueNotifier<T>, provided by the ValueNotifierExtension extension

Returns a read-only view of the ValueNotifier.
removeChangeListener(ValueChangeListener<T> listener) → void
Removes a listener from being notified of changes.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
override
toString() String
A string representation of this object.
override
unbind() → void
Unbinds the notifier from the other value.
uniDirectionalBind(ValueListenable<T> source) → void
Binds the notifier to the source unidirectionally.

Operators

operator ==(Object other) bool
The equality operator.
inherited