SafeValueNotifier<T> class
A safe implementation of ValueNotifier that prevents errors after disposal.
ValueNotifier 的安全实现,防止在释放后出错。
- Inheritance
-
- Object
- ChangeNotifier
- ValueNotifier<
T> - SafeValueNotifier
- Mixed-in types
Constructors
- SafeValueNotifier.new(T value)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Check if the notifier has listeners and log a warning if it does.
no setterinherited
- isDisposed → bool
-
Whether the notifier has been disposed.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T
-
The current value stored in this notifier.
getter/setter pairinherited
Methods
-
addListener(
VoidCallback listener) → void -
Safely add a listener if the notifier is not disposed.
inherited
-
dispose(
) → void -
Mark the notifier as disposed and release resources.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Safely notify listeners if the notifier is not disposed.
inherited
-
removeListener(
VoidCallback listener) → void -
Safely remove a listener if the notifier is not disposed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited