SignalLifecycle mixin

A mixin that provides lifecycle callbacks for reactive nodes.

This enables registering callbacks that run when the reactive node is disposed or when listener count changes.

Properties

disposed bool
Whether this reactive node has been disposed.
no setter
hashCode int
The hash code for this object.
no setterinherited
Whether this node is being kept alive by any keep-alive links.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes this node and calls all dispose callbacks.
keepAlive() KeepAliveLink
Creates a keep-alive link that prevents this node from being disposed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyAddListener() → void
Notifies listeners that a new listener was added.
notifyCancel() → void
Notifies that all listeners have been cancelled.
notifyRemoveListener() → void
Notifies listeners that a listener was removed.
notifyResume() → void
Notifies that listeners have resumed.
onAddListener(void callback()) → void
Registers a callback to be called when a listener is added.
onCancel(void callback()) → void
Registers a callback to be called when all listeners are paused/removed.
onDispose(DisposeCallback callback) → void
Registers a callback to be called when this node is disposed.
onRemoveListener(void callback()) → void
Registers a callback to be called when a listener is removed.
onResume(void callback()) → void
Registers a callback to be called when listeners resume after being cancelled.
toString() String
A string representation of this object.
inherited

Operators

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