BloomMountHandle class
Handle representing an active Bloom application mounted in the browser DOM.
Returned by mount, mountToElement, hydrate, and hydrateElement. The caller owns this handle and is responsible for calling unmount or dispose when the mounted subtree is no longer needed (e.g. during page unload or route change).
Disposing the handle detaches all child DOM elements from the host container, cancels
all reactive signals effects and listeners created during mount, and marks isDisposed
as true.
final handle = mount(App(), '#app');
// Later, when tearing down:
handle.unmount();
Constructors
-
BloomMountHandle(Element _root, List<
void Function()> _disposers) -
Creates a BloomMountHandle for
_rootholding the given_disposerscleanup functions.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
Whether this handle has already been disposed.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
Disposes all reactive effects and empties the container DOM element (
root.textContent = ''). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unmount(
) → void - Removes all child DOM elements from the host container and disposes all reactive effects.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited