zam_event_bus 0.1.0 copy "zam_event_bus: ^0.1.0" to clipboard
zam_event_bus: ^0.1.0 copied to clipboard

outdated

Event bus is a event based state management package for dart.

Event Bus #

State Management Package

Version Build Stars License

What's inside the package #

Includes the following core components.

Check out all the components in detail here

How to use #

final bus = EventBus([
  EventTransformer(SomeEvent, (event) => SomeOtherEvent()),
  EventMultiplier.direct(SomeOtherEvent, [SomeOtherEvent1(), SomeOtherEvent2()]),
]);
bus.publish(SomeEvent());
final sub = bus.select<SomeOtherEvent2>().listen(print); // Instance of 'SomeOtherEvent2'

await Future.delayed(Duration(seconds: 1));
await sub.cancel();
await bus.dispose();

To learn more, move on to the example section or check out this dedicated example in github.

Contributors #

0
likes
0
pub points
17%
popularity

Publisher

verified publisherzamstation.com

Event bus is a event based state management package for dart.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

zam_command_pattern, zam_core

More

Packages that depend on zam_event_bus