hive_box_manager 1.1.1
hive_box_manager: ^1.1.1 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.1 - 2026-08-28 #
Added #
UndecodableValueException, naming the key whose stored value failed to decode
Changed #
- Bump Dart SDK to ^3.13
Fixed #
- [#20]
valuesand the dualqueryBy*no longer fold one undecodable record into an opaqueParallelWaitError. They throwUndecodableValueExceptionnaming the key as your codec reports it, so the record can be deleted and compacted away. An eager box still cannot open over one at all: that is hive_ce decoding every value insideopenBox, tracked in hive_ce#318 with a fix in hive_ce#321 - Eager whole-box reads name the key whose value failed to decode, rather than surfacing a bare cast error that says nothing about which record caused it
- Watch events name the key whose value failed to decode, rather than putting a bare cast error on the stream with no way to tell which record caused it
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.