event_bus_global 1.0.1
event_bus_global: ^1.0.1 copied to clipboard
Type-safe global event bus for Flutter.
1.0.1 #
- README: fixed the installing instructions — the package is only available from pub.dev.
1.0.0 #
- Initial release of the
event_bus_globalpackage. - Type-safe global event bus:
EventBusIdentifier<T>to define typed events andEventBusGlobal.event()/EventBusGlobal.subEvent()to interact with them from anywhere. - Manual lifecycle: subscribe/unsubscribe with
ListenerDisposable. - Async support:
listenManuallyAsync()/emitAsync()for listeners that await async work. - Stream API: consume events as
Stream<T>orStream<(T, BusMetadata)>; supports broadcast mode viastream(broadcast: true). - Sticky events: cache the last emitted value and deliver it to new subscribers with
sticky: true; read it anytime vialastValue. - Middleware pipeline: intercept, transform, or cancel events before they reach listeners with
applyMiddleware(). - Execution priority: control listener order with the
priorityparameter. - BusMetadata: every emission carries a
timestamp; optionally attachsourceandextraData; access via*WithMetamethods. - Listener filter: filter emissions per-listener with the
whereparameter. - SubEvents: filtered views of events with their own sticky cache and listener list.
- One-shot listeners:
listenOnceManually()fires on the next emission, then auto-removes. - Event history: keep a circular buffer of the last N values with
historySize. - Logger interceptor:
EventBusGlobal.logEvents()fires for every emission before middlewares. waitFor(): await the next emission as aFuture<T>with timeout andwheresupport.- EventBusBuilder widget: rebuilds whenever an event or subEvent fires.