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
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether the object has listeners.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T
-
The current value of the object. When the value changes, the callbacks
registered with addListener will be invoked.
getter/setter pairoverride-getter
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 notifies its listeners.
override
-
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 -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readOnly(
) → ValueListenable< T> -
Available on ValueChangeNotifier<
Returns a read-only view of the ValueChangeNotifier.T> , provided by the ValueChangeNotifierExtension 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 the
object notifies.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited