FLUTTER ECOSYSTEM

hydrated

一個自動持久化的 BehaviorSubject,帶有 Flutter 的簡單資料還原功能。旨在與 BLoC 模式一起使用。

最新版本
2.1.0
近 30 天下載
55
喜歡數
29
Pub 分數
130

Package Overview

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

套件概覽

Hydrated 是一個 Flutter 套件,提供自動持久化的 BehaviorSubject,可於應用程式重新啟動後維持狀態。專為搭配 BLoC 模式使用而設計,透過自動將狀態儲存與還原至本機儲存空間來簡化狀態管理。該套件無需手動序列化或儲存邏輯即可確保資料的韌性,非常適合用於維護使用者偏好、會話資料或快取資訊。支援所有主要平台,包含 Android、iOS、Web、macOS、Windows 與 Linux。

適用情境
  • 保留使用者偏好
  • 快取應用狀態
  • 維護會話數據
  • 重啟後恢復UI狀態
  • 處理離線優先場景
主要特色
  • Automatic state persistence
  • Built-in serialization
  • Seamless BLoC integration
  • Cross-platform support
  • Minimal boilerplate
適合對象
  • BLoC-based state management
  • Apps needing offline data retention
  • Developers seeking simple persistence
  • Stateful apps with minimal setup
  • Projects requiring reliable data recovery
使用建議
  • Requires proper serialization of state objects
  • May increase initial load time due to disk I/O
  • Not suitable for large datasets
  • Limited to simple state types
  • Depends on platform-specific storage mechanisms
支援平台AndroidiOSWebmacOSWindowsLinux

安裝套件

flutter pub add hydrated

所屬分類

原始碼儲存庫

相關專案

暫無相關資料。