Signal<T extends Event> class

Lightweight wrapper around EventManager that mimics Django-like signals.

Handlers can connect and disconnect; when a signal dispatches, handlers are invoked sequentially. Registrations support optional de-duplication keys, sender scoping, and return a SignalSubscription for disposable lifecycle management. Exceptions are caught and re-published as UnhandledSignalError events for observability.

Constructors

Signal({required String name, required EventManager manager})

Properties

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

Methods

connect(FutureOr<void> handler(T event), {Object? key, Object? sender}) SignalSubscription<T>
disconnect(FutureOr<void> handler(T event)?, {Object? key}) → void
dispatch(T event, {Object? sender}) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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