First install the package via pub.dev. Then subscribe to broadcasts like this:
BroadcastReceiver receiver = BroadcastReceiver( names: <String>["de.kevlatus.broadcast"], ); receiver.messages.listen(print); receiver.start();
This package is currently under construction. Below you can find a quick overview of its implementation status. Contributions are welcome, if you are missing features.
ximplement broadcast receiver on Android
ximplement broadcast sending on Android
Contributions are much appreciated, but keep in mind that this package is supposed to be generic and only expose native broadcast APIs like Android's BroadcastReceivers and the iOS NotificiationCenter. Consider creating separate packages for sending and receiving specific broadcast instances.