bloc_signals_hydrate 1.0.3 copy "bloc_signals_hydrate: ^1.0.3" to clipboard
bloc_signals_hydrate: ^1.0.3 copied to clipboard

State persistence and hydration adapters for BlocSignal state containers.

1.0.3 #

  • Fix (hydrate): Guard clear() with if (isClosed) return; before resetting state to initialState, allowing storage deletion without triggering post-close emit assertions (#297).

1.0.2 #

  • Fix async persistence errors escaping onError: Attach unhandled future error handlers on storage.write and storage.delete to route disk and serialization failures to onError and BlocSignalObserver.
  • Fix memory and disk cache divergence in SecureHydratedStorage: Update in-memory cache only after successful serialization and storage writes.
  • Gate rejected and duplicate state emissions: Ensure persistence only writes when container is active and state actually changed; preserve monotonic state order under nested emits.
  • Constructor hydration write-back prevention: Avoid redundant storage rewrites when adopting restored state during constructor execution.
  • Add explicit uninitialized storage diagnostics: Eliminate silent production data loss when HydratedStorage.storage is not initialized by routing StateError to onError.
  • Surface decode and corrupt payload errors: Route FormatException to onError when stored JSON cannot be deserialized into StateType.
  • Namespaced storage & non-destructive clear(): Add optional prefix: parameter to SharedPreferencesHydratedStorage and SecureHydratedStorage, ensuring clear() removes only scoped keys rather than purging unrelated application data, with 100% backward compatibility (prefix: '' by default).

1.0.1 #

  • Clarify in documentation and README that primitive and collection state containers (int, double, String, bool, Map, List) require zero method overrides for fromJson or toJson.
  • Emphasize built-in SharedPreferences and SecureStorage sub-library adapters.

1.0.0 #

  • Official 1.0.0 production release.
  • Update bloc_signals dependency constraint to ^1.0.0.

0.9.0 #

  • Staging release candidate for the 1.0.0 production milestone.
  • Add storage exception recovery test suite for corrupted payload recovery in HydratedCubitSignal.
  • Update bloc_signals dependency constraint to ^0.9.0.

0.2.1 #

  • Add assertion-backed MemoryHydratedStorage fallback to HydratedStorage.storage in testing and debug mode, printing a clear diagnostic warning when accessed prior to explicit initialization.
  • Add HydratedStorage.isInitialized getter and HydratedStorage.reset() helper.
  • Preserve 100% production tree-shaking for release builds by enclosing fallback inside an assertion block.

0.1.7 #

  • Add assertion-backed MemoryHydratedStorage fallback to HydratedStorage.storage in testing and debug mode, printing a clear diagnostic warning when accessed prior to explicit initialization.
  • Add HydratedStorage.isInitialized getter and HydratedStorage.reset() helper.
  • Preserve 100% production tree-shaking for release builds by enclosing fallback inside an assertion block.

0.1.6 #

  • Add built-in SharedPreferencesHydratedStorage adapter available via import 'package:bloc_signals_hydrate/shared_preferences.dart';.
  • Add built-in SecureHydratedStorage adapter (FlutterSecureStorage / Keychain / KeyStore / Web Crypto) with async pre-loading (SecureHydratedStorage.build) for zero-flicker synchronous frame 1 state hydration available via import 'package:bloc_signals_hydrate/secure_storage.dart';.
  • Maintain 100% pure Dart package compatibility with zero Flutter SDK dependencies in core pubspec.yaml.

0.2.0 #

  • Add built-in SharedPreferencesHydratedStorage adapter available via import 'package:bloc_signals_hydrate/shared_preferences.dart';.
  • Add built-in SecureHydratedStorage adapter (FlutterSecureStorage / Keychain / KeyStore / Web Crypto) with async pre-loading (SecureHydratedStorage.build) for zero-flicker synchronous frame 1 state hydration available via import 'package:bloc_signals_hydrate/secure_storage.dart';.
  • Maintain 100% pure Dart package compatibility with zero Flutter SDK dependencies in core pubspec.yaml.

0.1.5 #

  • Provide default fromJson and toJson implementations in HydratedMixin so primitive state containers (int, double, String, bool, Map) require zero method overrides.
  • Add smart collection type-casting to HydratedMixin.fromJson to automatically cast raw jsonDecode outputs (List<dynamic>, Map<dynamic, dynamic>) to typed collections (List<T>, Map<K, V>) without requiring manual fromJson overrides.
  • Add runnable @example code blocks across HydratedStorage, MemoryHydratedStorage, HydratedMixin, HydratedCubitSignal, and HydratedBlocSignal.
  • Update bloc_signals dependency to ^0.2.8.

0.1.3 #

  • Add HydratedCubitSignal vs PersistentSignal (signals.dart) architectural comparison guide and interop documentation to README.

0.1.2 #

  • Add comprehensive ecosystem package cross-linking table and motto to README.
  • Add quick inlined hydration code examples.
  • Update bloc_signals dependency to ^0.2.6.

0.1.1 #

  • Added explicit constructor documentation comments for HydratedStorage and MemoryHydratedStorage.
  • Added standalone executable example/example.dart demonstrating persistence workflows.
  • Achieved 160/160 pub points on pub.dev.

0.1.0 #

  • Initial release of bloc_signals_hydrate.
  • Added HydratedStorage interface and zero-dependency MemoryHydratedStorage.
  • Added HydratedMixin, HydratedCubitSignal, and HydratedBlocSignal.
  • Supported dynamic / Object? JSON serialization (int, String, List, Map, bool) without map wrapping.
  • Supported synchronous initial constructor hydration.
  • Added clear() method for key deletion and state resets.
0
likes
160
points
155
downloads

Documentation

API reference

Publisher

verified publisherblocsignal.dev

Weekly Downloads

State persistence and hydration adapters for BlocSignal state containers.

Repository (GitHub)
View/report issues
Contributing

Topics

#bloc #signals #hydrated #persistence

License

MIT (license)

Dependencies

bloc_signals, meta, signals_core

More

Packages that depend on bloc_signals_hydrate