event_bus_global 1.0.1 copy "event_bus_global: ^1.0.1" to clipboard
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_global package.
  • Type-safe global event bus: EventBusIdentifier<T> to define typed events and EventBusGlobal.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> or Stream<(T, BusMetadata)>; supports broadcast mode via stream(broadcast: true).
  • Sticky events: cache the last emitted value and deliver it to new subscribers with sticky: true; read it anytime via lastValue.
  • Middleware pipeline: intercept, transform, or cancel events before they reach listeners with applyMiddleware().
  • Execution priority: control listener order with the priority parameter.
  • BusMetadata: every emission carries a timestamp; optionally attach source and extraData; access via *WithMeta methods.
  • Listener filter: filter emissions per-listener with the where parameter.
  • 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 a Future<T> with timeout and where support.
  • EventBusBuilder widget: rebuilds whenever an event or subEvent fires.
1
likes
150
points
117
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Type-safe global event bus for Flutter.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on event_bus_global