broadcast_bus 0.0.2
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:


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