Signal class sealed
A named, type-safe message emitter.
A subscription outlives the statement that made it and freezes the handler it was given, so it both leaks and goes stale unless something owns it.
Subscribing inside a Node.build hands that ownership to the node: the cleanup goes straight into its Node.trash, so the handler is resubscribed fresh by every build and torn down with the node. The returned Cleanup is a no-op there.
Everywhere else the caller owns the subscription: keep the Cleanup and
call it, e.g. from flutter_hooks.
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
watch(
void watcher()) → Cleanup - Subscribes to this signal, ignoring data.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited