DefaultEventPlugin class final
Default implementation of EventPlugin using the event_bus package.
This implementation provides a simple and efficient event bus that:
- Supports multiple subscribers
- Handles event type safety
- Provides automatic cleanup
Example:
final plugins = PluginDescriptor(
event: DefaultEventPlugin(),
);
- Inheritance
-
- Object
- Plugin
- EventPlugin
- DefaultEventPlugin
Constructors
Properties
Methods
-
dispose(
) → Future< void> -
override
-
emit<
T extends VyuhEvent> (T event) → void -
Emit an event to all subscribers.
override
-
init(
) → Future< void> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on<
T extends VyuhEvent> (VyuhEventListener< T> listener) → DisposeFunction -
Subscribe to events of type
T
.override -
once<
T extends VyuhEvent> (VyuhEventListener< T> listener) → void -
Subscribe to a single occurrence of an event of type
T
.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited