broadcast_events 1.0.0+1
broadcast_events: ^1.0.0+1

Dart native js
Flutter Android iOS web

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);
4
likes
90
pub points
74%
popularity

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

Documentation

API reference

Uploader

devashishpuri@gmail.com

License

MIT (LICENSE)

More

Packages that depend on broadcast_events