Hive Storage Plugin
HiveStoragePlugin persists general values in a Hive box. The boxName selects the store. This is general storage, not the SecureStoragePlugin contract.
How the pieces fit together
Browse every public declaration and member.
The vyuh_plugin_storage_hive package provides a storage plugin implementation for the Vyuh Framework using Hive, a lightweight and fast key-value database for Flutter and Dart.
Overview
This plugin implements the StoragePlugin interface from vyuh_core, providing persistent key-value storage for non-sensitive application data. It is suitable for caching user preferences, app state, and other data that does not require encryption.
Usage
import 'package:vyuh_core/vyuh_core.dart' as vc;
import 'package:vyuh_plugin_storage_hive/vyuh_plugin_storage_hive.dart';
void main() {
vc.runApp(
plugins: vc.PluginDescriptor(
storage: HiveStoragePlugin(),
// ... other plugins
),
features: () => [
// ... features
],
);
}Once configured, you can access storage through the Vyuh platform:
final storage = vc.vyuh.getPlugin<vc.StoragePlugin>()!;
// Write a value
await storage.write('key', 'value');
// Read a value
final value = await storage.read('key');
// Check if a key exists
final exists = await storage.has('key');
// Delete a value
await storage.delete('key');Links
Supported values follow Hive storage rules; custom types require registered adapters.