boot_events 0.2.0+1
boot_events: ^0.2.0+1 copied to clipboard
Event system for Boot (EventBus, @EventListener).
boot_events #
Event system for the Boot Framework.
Features #
EventBus— publish/subscribe with type-safe events@EventListener— annotation for auto-discovered listenersStartupEvent,ShutdownEvent— built-in lifecycle events
Usage #
class UserCreated { final String name; UserCreated(this.name); }
// Publish
eventBus.publish(UserCreated('Alice'));
// Listen
eventBus.on<UserCreated>((e) => print('Created: ${e.name}'));