パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.4.0

flutter_broadcasts

Android のインテントと iOS の通知を使用してブロードキャストを送受信するためのプラグインです。

AndroidiOS
30日間ダウンロード
9900
いいね数
28
Pub ポイント
140

パッケージをインストール

flutter pub add flutter_broadcasts

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

flutter_broadcasts は、Android のインテントと iOS の通知を通じてクロスプラットフォーム間の通信を可能にする Flutter プラグインです。アプリがブロードキャストを送受信でき、両方のプラットフォームでアプリ間メッセージングやイベント処理を容易にします。Android では、信頼性の高いメッセージ配信のためにネイティブな Intent システムを利用し、iOS ではローカル通知およびプッシュ通知を使用してブロードキャストの挙動をシミュレートします。このプラグインは、ネイティブコードの知識が不要で、プラットフォーム固有のメッセージングシステムとの統合を簡素化します。バックグラウンドタスクの調整、アプリ間通信、または外部イベントに基づくアクションのトリガーなど、さまざまなシナリオに適しています。

用途

  • アプリ間メッセージング
  • バックグラウンドタスクの調整
  • イベント駆動型アプリケーションアーキテクチャ
  • プッシュ通知のトリガー
  • システムイベントのリスニング

主な機能

  • Android Intent サポート
  • iOS通知ベースのブロードキャスト
  • クロスプラットフォームの一貫性
  • 送信/受信のためのシンプルな API
  • ネイティブコードは不要です

適している対象

  • モジュール型アプリを開発する開発者
  • バックグラウンド通信を必要とするアプリ
  • システムレベルのイベントとの統合
  • クロスプラットフォームメッセージングの必要性
  • イベント駆動型デザインを使用するアプリ

注意事項

  • 通知の制限により、iOSでは限定的です
  • 適切な権限処理が必要です
  • バックグラウンド実行のセットアップが必要になる場合があります
  • 高頻度のメッセージ送信には適していません
  • プラットフォーム固有の動作の違い

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト