ValueNotifier<T> class
A ChangeNotifier that holds a single value and notifies when it changes.
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier
- Implemented types
Constructors
- ValueNotifier(T _value)
- Creates a ValueNotifier with the given initial value.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T
-
The current value held by this object.
getter/setter pairoverride-getter
Methods
-
addListener(
void listener()) → void -
Register
listenerto be called when the object notifies.inherited -
dispose(
) → void -
Releases all listeners. After this call the notifier should not be used.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Notify all registered listeners.
inherited
-
removeListener(
void listener()) → void -
Remove a previously registered
listener.inherited -
throwIfDisposed(
) → void -
Throws StateError if this notifier has already been disposed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited