hive_box_manager library

Typed, fpdart-first façades over hive_ce boxes: no nulls, lazy effects, ready-made CRUD, purpose-built box variants.

Classes

BoxObserver
Semantic observer over one or many boxes: extend it and override only the events you care about.
DualKeyBox<T extends Object, K1 extends Object, K2 extends Object>
A typed, fpdart-first façade over an eager hive box addressed by a two-part composite key, with reverse queries by either part folded in.
DualKeyCodec<K1 extends Object, K2 extends Object>
Encodes a two-part composite key into hive's raw key domain, and decodes it back.
IntKeyCodec
Identity codec for boxes keyed by raw hive int keys (0..0xFFFFFFFF).
KeyCodec<K extends Object>
Encodes consumer-facing keys of type K into hive's raw key domain, and decodes them back.
KeyedBox<T extends Object, K extends Object>
A typed, fpdart-first façade over an eager hive box of T values keyed by K.
LazyDualKeyBox<T extends Object, K1 extends Object, K2 extends Object>
A typed, fpdart-first façade over a lazy hive box addressed by a two-part composite key, with reverse queries by either part folded in.
LazyKeyedBox<T extends Object, K extends Object>
A typed, fpdart-first façade over a lazy hive box of T values keyed by K.
LazyListBox<T extends Object, K extends Object>
A typed, fpdart-first façade over a lazy hive box storing a List of T per K key.
LazyMapBox<MK extends Object, MV extends Object, K extends Object>
A lazy box holding a Map of MK to MV per K key, read off disk when asked.
LazySetBox<T extends Object, K extends Object>
A lazy box holding a Set of T per K key, read off disk when asked.
LazySingleValueBox<T extends Object>
A typed, fpdart-first façade over a lazy hive box holding exactly one T value.
LazyTypedBoxEvent<T extends Object, K extends Object>
One change on a lazy box's watch stream: the decoded key and the value the engine could actually deliver.
ListBox<T extends Object, K extends Object>
A typed, fpdart-first façade over an eager hive box storing a List of T per K key.
MapBox<MK extends Object, MV extends Object, K extends Object>
An eager box holding a Map of MK to MV per K key.
PackedIntDualCodec
The opt-in performance dual-key codec: packs 2 parts of 16 bits arithmetically into one u32 int key.
PrintingBoxObserver
Ready-made sink forwarding every box event to dart:developer's log under a configurable logger name, so DevTools can filter the package's diagnostics as one channel.
SetBox<T extends Object, K extends Object>
An eager box holding a Set of T per K key.
SingleValueBox<T extends Object>
A typed, fpdart-first façade over an eager hive box holding exactly one T value.
StringCompositeDualCodec
The default dual-key codec: packs 2 int parts into a compact decimal '$primary:$secondary' String key.
StringKeyCodec
Identity codec for boxes already keyed by hive String keys. Non-ASCII is fine, just remember the limit counts bytes, not characters.
TypedBoxEvent<T extends Object, K extends Object>
One change on an eager box's watch stream: the decoded key, the affected value, and whether the change deleted the entry.

Exceptions / Errors

UndecodableValueException
One stored value could not be decoded, naming the key whose record failed.