AutoDisposeHook<T extends Disposable> class
Creates a stream hook from a reactive node. A hook implementation that manages disposable Jolt reactive nodes.
This hook automatically disposes the reactive node when the widget is unmounted or when the hook is removed during hot reload.
This is used internally by all Jolt hook functions (useSignal, useComputed, etc.) to ensure proper lifecycle management.
Constructors
- AutoDisposeHook(T creator())
Properties
- context → BuildContext
-
The BuildContext of the widget that owns this hook.
no setterinherited
- creator → T Function()
-
Function that creates the reactive node.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → T
-
The current state value of this hook.
no setterinherited
Methods
-
activated(
) → void -
Called when the widget is reactivated.
inherited
-
build(
) → T -
Builds the initial state for this hook.
override
-
deactivated(
) → void -
Called when the widget is deactivated.
inherited
-
didChangeDependencies(
) → void -
Called when the widget's InheritedWidget dependencies change.
inherited
-
didUpdateWidget(
) → void -
Called when the parent widget is updated with new properties.
inherited
-
mount(
) → void -
Called after the hook is created and added to the widget.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reassemble(
) → void -
Called during hot reload when this hook is reused.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unmount(
) → void -
Called when the hook is being removed.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited