패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.4.0

flutter_broadcasts

Android 인텐트와 iOS 알림을 사용하여 브로드캐스트를 보내고 받는 플러그인입니다.

AndroidiOS
30일 다운로드
9.9천
좋아요
28
Pub 점수
140

패키지 설치

flutter pub add flutter_broadcasts

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

flutter_broadcasts는 Android 인텐트와 iOS 알림을 통해 크로스 플랫폼 통신을 가능하게 하는 Flutter 플러그인입니다. 앱이 브로드캐스트를 보내고 받을 수 있도록 하여 두 플랫폼에서 앱 간 메시징과 이벤트 처리를 촉진합니다. 안드로이드에서는 신뢰할 수 있는 메시지 전달을 위해 네이티브 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.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트