hive_box_manager 1.0.0
hive_box_manager: ^1.0.0 copied to clipboard
Type-safe, FP-style abstraction layers for Hive's boxes. Provides Managers for almost all conceivable use-cases and scenarios.
1.0.0 - 2026-07-22 #
Added #
KeyedBoxandLazyKeyedBox: typed key/value boxes with ready-madeget,put,update,delete,clear, andwatch.SingleValueBoxandLazySingleValueBox: single-slot boxes for one value (a token, one config blob, the theme), reading 0.0.x single-box data in place.IterableBoxandLazyIterableBox: a typed list per key, reifying the element type at the read boundary so collections of custom types survive a restart.DualKeyBoxandLazyDualKeyBox: two-part composite keys with folded reverse queries (queryByPrimaryandqueryBySecondary).- Key-codec seam (
KeyCodecandDualKeyCodec) with shippedIntKeyCodec,StringKeyCodec,StringCompositeDualCodec, andPackedIntDualCodec(bit-identical to the 0.0.x.bitShiftkeys, so those boxes read in place). BoxObserverandPrintingBoxObserverfor per-instance semantic event observation, with typedTypedBoxEventandLazyTypedBoxEventwatch events.- Write-path key validation that rejects out-of-range int keys and oversized String keys with an
ArgumentError, before hive can silently corrupt the box.
Changed #
- Rewritten from scratch as an fpdart-first surface: reads return
OptionorTaskOption, writes and lifecycle effects returnTask, acquisition encodes openness, and there is nonulland nodefaultValue. Breaking change from 0.0.x; see MIGRATION.md. - Raised the Dart SDK floor to 3.12.0.
- Raised the
hive_ceconstraint to ^2.19.3.
Fixed #
watch()no longer crashes on delete: eager events carry the removed value and lazy events carry anOption, replacing the 0.0.x nullable-cast crash.- Collections of custom types no longer leak
dynamicor throw on the first read after a restart (hive_ce issue #150), via theIterableBoxread-boundary reification. - Lowered the
metalower bound to ^1.14.0 so Flutter apps resolve the package against the Flutter-pinnedmeta.
Removed #
- Removed the entire 0.0.x API:
BoxManagerandLazyBoxManager, theSingleIndexandCollectionLazyBoxManagermanagers, theDualIntIndexandQueryDualIntIndexfamilies, plusdefaultValue,tryGet,getAll,storedIds,watchStream, andassignManagerLogCallback. See MIGRATION.md for the mapping to 1.0. - Dropped
collectionfrom the runtime dependencies.