SafeNotifierMixin mixin

A mixin that provides safe notification and disposal methods for ChangeNotifier.

提供安全的通知和资源释放方法的混入类。

Superclass constraints
Mixin applications

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 setteroverride
isDisposed bool
Whether the notifier has been disposed.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Safely add a listener if the notifier is not disposed.
override
dispose() → void
Mark the notifier as disposed and release resources.
override
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.
override
removeListener(VoidCallback listener) → void
Safely remove a listener if the notifier is not disposed.
override
toString() String
A string representation of this object.
inherited

Operators

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