FLUTTER ECOSYSTEM

hydrated_bloc

An extension to the bloc state management library which automatically persists and restores bloc states.

Latest version
11.0.0
30-day downloads
148.3K
Likes
964
Pub points
160

Package Overview

Selection guidance generated from public package information. For reference only.

Overview

HydratedBloc is an extension of the Bloc library that enables automatic persistence and restoration of state across app restarts. It seamlessly saves bloc states to local storage (such as SharedPreferences or a file system) and restores them when the app reinitializes, ensuring a consistent user experience. Ideal for maintaining user preferences, form data, or session states without manual serialization. Built on top of the popular Bloc framework, it integrates smoothly with existing Bloc-based architectures.

Use cases
  • Persisting user preferences
  • Restoring form data after restart
  • Maintaining session state
  • Saving app configuration
  • Handling offline state recovery
Key features
  • Automatic state persistence
  • Cross-platform support
  • Seamless integration with Bloc
  • Configurable storage backend
  • State restoration on app launch
Suitable for
  • Apps requiring state durability
  • Developers using Bloc pattern
  • Projects needing offline resilience
  • Mobile and web applications
  • State-heavy UIs
Considerations
  • Requires additional setup for storage
  • Potential performance impact with large states
  • Security risks with sensitive data
  • Not suitable for real-time sync
  • Manual handling of migration between versions
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add hydrated_bloc

Categories

Source repository

Related projects

Rankings