Welcome to the OmniKV monorepo!
OmniKV is a strongly-typed, storage-agnostic key-value framework for Dart and Flutter. It completely eliminates magic strings, implicit type casting, and runtime parsing errors when dealing with app settings, feature flags, auth tokens, and local caches.
Note: If you are looking for documentation on how to use OmniKV in your app, please see the core package documentation.
This repository is managed as a workspace using Melos. It contains the pure-Dart core package alongside several officially supported storage adapters.
| Package | Version | Description |
|---|---|---|
omni_kv |
Pure Dart core APIs, typed keys, converters, capabilities, and the MemoryKvAdapter. |
|
omni_kv_shared_preferences |
Flutter adapter backed by shared_preferences. |
|
omni_kv_secure_storage |
Flutter adapter backed by flutter_secure_storage. |
|
omni_kv_hive_ce |
Dart/Flutter adapter backed by hive_ce. |
omni_kv_workspace/
├── pubspec.yaml # Workspace root configuration
├── melos.yaml # Melos configuration and scripts
├── analysis_options.yaml # Shared strict linting rules
│
├── packages/ # Core framework and adapters
│ ├── omni_kv/
│ ├── omni_kv_hive_ce/
│ ├── omni_kv_secure_storage/
│ └── omni_kv_shared_preferences/
│
└── example/ # Comprehensive example app
├── bin/ # Pure Dart CLI demos
└── lib/ # Flutter visual demo
The example directory contains both pure Dart CLI applications and a fully functional Flutter
application demonstrating all the adapters.
Run the pure Dart Memory & Hive examples:
cd example
dart run bin/main.memory.dart
dart run bin/main.hive_ce.dartRun the Flutter example (SharedPreferences & Secure Storage):
cd example
flutter run -t lib/main.dartThis repository relies on Melos to manage the multi-package setup.
First, activate Melos globally and bootstrap the workspace to link all local dependencies together.
dart pub global activate melos
melos bootstrapWe have configured several Melos scripts to ensure code quality across the entire workspace.
Format all code:
melos run format:applyRun static analysis (linting):
melos run analyzeRun all tests (Dart & Flutter):
melos run test(This automatically runs dart test for pure Dart packages and flutter test for
Flutter-dependent packages).
This workspace is licensed under the MIT License.