event_bus_plus
0.7.0, released a year ago by devcraft.ninja
Publisher/subscriber event bus library for Dart and Flutter.
What it does
Provides a central communication bus using the publisher/subscriber pattern to decouple event senders and receivers. It supports filtering by event type, tracking events in progress, maintaining an event history, and mapping events.
AI-written summary of version 0.7.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to simplify communication between decoupled components or widgets.
- You want to track event history and monitor events in progress.
Skip it when
- You prefer built-in state management solutions like Provider or Bloc for complex application state.
Strengths
- Decouples event senders and receivers
- Supports event progress tracking and history
- Includes event mapping capabilities
Weaknesses
- Global event buses can make debugging data flow harder if overused
- Limited to publisher/subscriber patterns
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
IAppEventBus eventBus = AppEventBus();
final event = FollowEvent('@devcraft.ninja');
eventBus.on<FollowAppEvent>().listen((e) { /*do something*/ });
eventBus.fire(event);Alternatives
Packages that do the same job and could replace event_bus_plus.
- event_bus
A lightweight event bus using Dart Streams for publish/subscribe communication
50Compare - event_hub
An event bus library to dispatch and listen to events across your app using Dart streams.
43Compare - bloc_concurrency
Custom event transformers for the bloc state management package.
82Compare - hierarchical_state_machine
Performant hierarchical state machine framework inspired by UML.
62Compare
Works with
Packages commonly used together with event_bus_plus: ones it builds on, ones built on it, and its own family.
- clockevent_bus_plus depends on itA fakeable wrapper for dart:core clock APIs.
- equatableevent_bus_plus depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- rxdartevent_bus_plus depends on itImplementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
- loggerevent_bus_plus depends on itAn extensible logger for printing formatted logs with levels, custom filters, and printers.