Event class final
Singleton class that manages event-based communication using StreamController.
This implementation replaces the event_bus package, leveraging
Dart's native Stream API to provide a lightweight, type-safe event system.
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
-
dispose<
T> () → void -
Disposes a specific listener for event type
T. -
disposeAll(
) → void - Disposes all listeners and closes all stream controllers.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on<
T> (void callback(T event), {bool broadcast = true}) → void -
Registers a listener for events of type
T. -
streamOf<
T> () → Stream< T> -
Returns a broadcast Stream for events of type
T. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
emit<
T> (T event) → void -
Emits (fires) an event of type
T.