Search packages, repositories and app categories

Package detailsv0.4.0

flutter_broadcasts

A plugin for sending and receiving broadcasts with Android intents and iOS notifications.

AndroidiOS
30-day downloads
9.9K
Likes
28
Pub points
140

Install package

flutter pub add flutter_broadcasts

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

flutter_broadcasts is a Flutter plugin enabling cross-platform communication through Android intents and iOS notifications. It allows apps to send and receive broadcasts, facilitating inter-app messaging and event handling on both platforms. On Android, it leverages the native Intent system for reliable message delivery, while on iOS, it uses local and push notifications to simulate broadcast behavior. The plugin simplifies integration with platform-specific messaging systems without requiring native code knowledge. It's ideal for scenarios like background task coordination, app-to-app communication, or triggering actions based on external events.

Use cases

  • Inter-app messaging
  • Background task coordination
  • Event-driven app architecture
  • Push notification triggers
  • System event listening

Key features

  • Android Intent support
  • iOS notification-based broadcasts
  • Cross-platform consistency
  • Simple API for sending/receiving
  • No native code required

Suitable for

  • Developers building modular apps
  • Apps needing background communication
  • Integrations with system-level events
  • Cross-platform messaging needs
  • Apps using event-driven design

Considerations

  • Limited on iOS due to notification constraints
  • Requires proper permission handling
  • May need background execution setup
  • Not suitable for high-frequency messaging
  • Platform-specific behavior differences

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Flutter Broadcasts

A plugin for sending and receiving broadcasts with Android intents and iOS notifications. The API is inspired by Android's BroadcastReceivers and uses the NotificationCenter internally on iOS.

Quick Start

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();

Roadmap

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.

  • [x] implement broadcast receiver on Android
  • [x] implement broadcast sending on Android
  • [ ] implement NSNotificationCenter subscriptions on iOS
  • [ ] implement NSNotificationCenter notifications on iOS

Contributions

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.

If you have any ideas for extending this package to other platforms, feel free to open a pull request or raise an issue.

Categories

Source repository

Projects using this package