broadcast_events 1.0.0+1 copy "broadcast_events: ^1.0.0+1" to clipboard
broadcast_events: ^1.0.0+1 copied to clipboard

outdated

Enables you to broadcast global events in your app. Helpful in cases where your modules/components need to know about a change happened somewhere in your app.

broadcast_events #

Enables you to broadcast events in your app.

Usage #

/// Subscription Example
BroadcastEvents().subscribe<String>('CUSTOM_EVENT', (message) {
    print(message);
});

BroadcastEvents()
    .publish<String>('CUSTOM_EVENT', arguments: 'Hello Subscribers');

/// Unsubscription Example
final _handler = (int code) => print('The Code is: $code');

BroadcastEvents().subscribe<int>('CUSTOM_EVENT_2', _handler);

BroadcastEvents().unsubscribe<int>('CUSTOM_EVENT_2', handler: _handler);

BroadcastEvents().publish<int>('CUSTOM_EVENT_2', arguments: 2);
17
likes
30
pub points
53%
popularity

Publisher

unverified uploader

Enables you to broadcast global events in your app. Helpful in cases where your modules/components need to know about a change happened somewhere in your app.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

More

Packages that depend on broadcast_events