hive_box_manager 1.1.0
hive_box_manager: ^1.1.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.1.0 - 2026-07-27 #
Added #
- [#17] Bring back
putAllBy/putAllGrouped, the 0.0.x self-keying batch write
Changed #
- BREAKING: renamed
IterableBoxtoListBoxandLazyIterableBoxtoLazyListBox. Members, contracts, and on-disk frames are unchanged, so a find-and-replace on the two names is the entire migration.Iterablewas a misnomer: the box takes and returns aList, hive rejects non-Listiterables at write time, and the name would have made the plannedSetBoxlook like a subtype rather than a sibling, with no room forMapat all.
Fixed #
- [#13] Correct the DualKeyBox overhead figures and name their real cause
- [#14] Reduce DualKeyBox eager reads to near-native Hive speed
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.