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
listenerto 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
sourcebidirectionally. -
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<
Maps the value of the ValueChangeNotifier to a new value.T> , provided by the ValueChangeNotifierExtension extension -
map<
R> (R mapper(T value)) → ValueListenable< R> -
Available on ValueListenable<
Returns a read-only view of the ValueListenable.T> , provided by the ValueListenableExtension extension -
map<
R> (R mapper(T value)) → ValueListenable< R> -
Available on ValueNotifier<
Maps the value of the ValueNotifier to a new value.T> , provided by the ValueNotifierExtension extension -
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<
Returns a read-only view of the ValueChangeNotifier.T> , provided by the ValueChangeNotifierExtension extension -
readOnly(
) → ValueListenable< T> -
Available on ValueNotifier<
Returns a read-only view of the ValueNotifier.T> , provided by the ValueNotifierExtension extension -
removeChangeListener(
ValueChangeListener< T> listener) → void -
Removes a
listenerfrom 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
sourceunidirectionally.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited