搜尋套件、儲存庫與 APP 分類

套件詳情v2.1.1

bloc_event_status

在不更新狀態的情況下追蹤 bloc 中事件的狀態。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
63
喜歡數
2
Pub 分數
150

安裝套件

flutter pub add bloc_event_status

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

bloc_event_status 套件允許開發者在不觸發狀態更新的情況下追蹤 Bloc 中事件的狀態。它提供了一種輕量級機制,用於監控事件生命週期狀態,例如載入、成功或失敗,從而實現更好的 UI 反饋和除錯。適用於需要獨立於狀態變更進行事件追蹤的場景,可增強複雜狀態管理流程中的可觀測性。該套件與現有的 Bloc 模式無縫整合,並支援所有主要的 Flutter 平台。

適用情境

  • 監控事件進度而不改變狀態
  • 在複雜的 Bloc 中調試事件流
  • 根據事件狀態顯示加載指示器
  • 增強異步操作期間的使用者回饋

主要特色

  • 非侵入式事件狀態追蹤
  • 無需狀態更新
  • 支援多種事件狀態
  • 輕量且易於整合
  • 跨平台相容性

適合對象

  • 使用 Bloc 模式的開發者
  • 需要詳細事件監控的團隊
  • 需要即時事件回饋的應用程式
  • 具有複雜異步工作流程的專案

使用建議

  • 不修改狀態
  • 需要理解 Bloc 事件生命周期
  • 最好與其他狀態管理方法搭配使用
  • 僅限事件狀態追蹤

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

BlocEventStatus

BlocEventStatus CI codecov License: MIT

Compose event status tracking into your BLoC state — track loading, success, failure (or any custom status) per event type without modifying your main state logic.

Packages

This repository is a monorepo containing the following packages:

Package Description pub.dev
bloc_event_status Core library — EventStatuses, EventStatusesMixin, and the @blocEventStatus annotation. pub package
bloc_event_status_generator Code generator that produces Emitter extensions from @blocEventStatus-annotated Blocs. pub package

Quick Start

# Core library
dart pub add bloc_event_status

# Optional: code generator for emitter extensions
dart pub add --dev bloc_event_status_generator build_runner

See the bloc_event_status README for full documentation and usage examples.

Contributing

We welcome contributions! Please open an issue, submit a pull request or open a discussion on GitHub.

License

This project is licensed under the MIT License.

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。