CleanableNode mixin

Registers disposers that run when an effect node is cleaned up or disposed.

Applied to BaseEffectNode implementations such as EffectNode and EffectScopeNode. Cleanup runs inside untracked so disposers do not create new dependencies.

Example:

class LoggingEffect extends BaseEffectNode {
  LoggingEffect() : super(flags: ReactiveFlags.watching) {
    onCleanup(() => print('effect cleaned up'));
  }
}
Mixin applications

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cleanup() → void
Runs all registered cleanup callbacks and clears the registry.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCleanup(Disposer cleanup) → void
Registers cleanup to run on the next cleanup or dispose.
toString() String
A string representation of this object.
inherited

Operators

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