stash_hive
5.2.0, released 3 years ago by ivoleitao.dev
Hive storage extension for the stash caching API
WASM-readyRepository archived
What it does
Provides support to store vaults and caches in the Hive database using binary msgpack serialization.
AI-written summary of version 5.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are using the stash caching API and want to use Hive as the persistent storage backend.
- You need high-performing binary serialization for cached items or vaults.
Skip it when
- You are looking for a standalone Hive database implementation without the stash API wrapper.
- You do not need caching features.
Strengths
- Integrates seamlessly with the stash caching ecosystem.
- Relies on efficient msgpack binary serialization.
Weaknesses
- Requires managing dependencies for both stash and Hive.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Add stash_hive to pubspec.yaml and import the library along with stash.
import 'package:stash/stash_api.dart';
import 'package:stash_hive/stash_hive.dart';
void main() async {
final store = await newHiveDefaultVaultStore(path: Directory.systemTemp.path);
final vault = await store.vault<Task>(name: 'vault', fromEncodable: (json) => Task.fromJson(json));
}Alternatives
Packages that do the same job and could replace stash_hive.
Works with
Packages commonly used together with stash_hive: ones it builds on, ones built on it, and its own family.
- universal_platformstash_hive depends on itPlatform detection across Flutter, Dart web, and desktop without errors
- hivestash_hive depends on itFast, pure Dart key-value store with optional AES-256 encryption
- stashstash_hive depends on itKey-value store abstraction with caching semantics and pluggable backends.
- stash_memorySame familyMemory storage extension for the stash API to store vaults and caches in-memory.