Livestream은 애플리케이션의 다양한 부분 간 통신을 단순화하기 위해 설계된 가벼운 Flutter 패키지입니다. 이는 이벤트를 방송하고 수신하는 간단한 방법을 제공하여, 더 큰 프레임워크의 복잡성 없이 상태 관리 및 모듈 간 통신에 이상적입니다. 패키지는 간단한 발행-구독 패턴을 기반으로 하여 위젯, 서비스 또는 화면 간에 효율적인 데이터 흐름을 가능하게 합니다. 최소한의 설정과 외부 종속성이 없으며, Livestream은 Flutter 앱의 모듈성과 반응성을 향상시킵니다.
사용 사례
실시간 이벤트 방송
크로스 위젯 통신
상태 업데이트 간소화
앱 모듈 분리
화면 간 사용자 작업 처리
플러그인 상호작용 간소화
주요 기능
간단한 발행-구독 모델
최소한의 보일러플레이트
외부 종속성 없음
경량이고 빠름
기존 코드와의 간편한 통합
타입화된 이벤트를 지원합니다
적합한 대상
작은에서 중간 규모의 Flutter 앱
경량 상태 관리를 찾는 개발자
복잡한 종속성 주입을 피하는 팀
빠른 이벤트 기반 통신이 필요한 앱
빠른 UI 업데이트 프로토타이핑
확장성보다 단순성을 우선시하는 프로젝트
고려 사항
대규모 상태 관리에 적합하지 않습니다
기본 이벤트 처리에 제한됨
내장된 지속성 또는 복구 없음
임시 또는 일시적인 데이터에 최적
장기간 실행되는 앱에서는 수동 정리가 필요할 수 있습니다
복잡한 데이터 동기화에 적합하지 않음
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
LiveStream - Dart
LiveStream is a data holder class which can observe change of data in real-time and emit values too. Here's emitter subscriber pattern. It's developed in pure Dart.
Whenever data is emitted to chat-message channel/stream above block will be executed.
Emitting Events or Broadcasting
The main idea behind LiveStream is that you can send and receive any events you want, with any data you want. Any objects that can be encoded as JSON will do, and binary data is supported too. See code below.
MIT LicenseCopyright (c) 2020ShreyasPatilPermissionis hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Softwareis
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.