broadcast_bus 0.0.2 copy "broadcast_bus: ^0.0.2" to clipboard
broadcast_bus: ^0.0.2 copied to clipboard

A new Flutter package project.

broadcast_bus #

Broadcast bus defines a global bus that can be used across your application, completly context free.

Internally, it uses a Stream of String, supporting multiple listeners.

Usage #

It is possible to emit a new value on the bus using:

BroadcastBus().emit('event');

and listening for events (or a specific event):


BroadcastBus().getMainBus().listen((event) { 
    // check the event and react
})

...

BroadcastBus().getFilteredBus('specific event').listen((_) {
    //react to the event
}
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter package project.

Homepage
Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on broadcast_bus