smart_local_storage library

Compatibility entry point - same as smart_local_cache.dart.

Classes

SmartBox
A named, disk-backed collection of records with plain Map data.
SmartBoxEvent
One change in a box. id is null for SmartBoxEventType.cleared.
SmartLazyBox
A disk-backed box for BIG data. Only the ids (and where each record sits in the file) live in memory - the records themselves stay on disk and are read one at a time. A million records cost tens of MB of RAM, not GBs.
SmartLocalStorage
Entry point: open named boxes to store lists of records (with ids) on disk - plain Maps in, plain Maps out, no model classes needed.
SmartLocalStorageDesktop
Registers the Dart-only desktop implementation (macOS, Linux, Windows).
SmartModelBox<T>
A typed view over a SmartBox, for when you'd rather work with your own model class than raw Map<String, dynamic>.

Enums

SmartBoxEventType
Kinds of change a box can report on SmartBox.events.

Typedefs

SmartMigration = FutureOr<void> Function(int fromVersion, int toVersion, Map<String, Map<String, dynamic>> records)
Called once when a box is opened with a higher version than the one stored on disk. Mutate records in place (id -> record) to upgrade them.