KaiselChangeNotifier class
Minimal pure-Dart re-implementation of ChangeNotifier.
Implements the subset of ChangeNotifier's contract the router relies
on: snapshot-iterate on notify (so listeners may add/remove during
dispatch), idempotent removal, and throw-after-dispose. Unlike Flutter's
release-mode ChangeNotifier, notifyListeners throws if called after
dispose — matching the debug-mode contract the router documents and
already guards against.
- Implemented types
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
Whether dispose has been called.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
void listener()) → void -
Register
listenerto be called on every change notification.override -
dispose(
) → void - Release all listeners. Subsequent addListener/notifyListeners throw.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void - Call every registered listener. Iterates over a snapshot so a listener may add or remove listeners during dispatch without disturbing the run.
-
removeListener(
void listener()) → void -
Remove a previously registered
listener. Idempotent.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited