polykv 0.1.1 copy "polykv: ^0.1.1" to clipboard
polykv: ^0.1.1 copied to clipboard

Truly Zero Config Native PolyKV for Dart/Flutter.

PolyKV - Dart / Flutter #

Pub Version License Stars Platform

Zero Configuration Key-Value Store for Flutter & Dart.

PolyKV for Flutter is the ultimate cross-platform persistence solution. It abstracts away SharedPreferences (Mobile), localStorage (Web), and File I/O (Desktop) into a single, unified API.

One API, Everywhere. This library is part of the PolyKV ecosystem. Use the same consistent API across 12+ languages.

✨ Why PolyKV Dart? #

  • 🦋 Flutter Optimized Works seamlessly on iOS, Android, macOS, Windows, Linux, and Web. One package to rule them all.

  • 📱 Native Performance Uses platform-native storage engines directly. No SQLite overhead, no heavy initialization.

  • 🛡 Compile-Time Safety Strongly typed Dart API prevents runtime errors.

📦 Installation #

flutter pub add polykv

🚀 Usage #

Complete Async Example #

import 'package:polykv/polykv.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  
  // Init
  final kv = await PolyKV.init("MyApp");
  
  // 1. Save (Set)
  await kv.setString("username", "alice");
  await kv.setBool("is_dark_mode", true);
  await kv.setMap("profile", {"age": 30});

  // 2. Read (Get)
  final user = await kv.getString("username");
  print("User: $user");

  // 3. Update
  await kv.setBool("is_dark_mode", false);

  // 4. Delete
  await kv.remove("profile");

  // 5. Clear All
  await kv.clear();
}

📂 Storage Locations #

  • Mobile: SharedPreferences (Android) / UserDefaults (iOS)
  • Web: Browser localStorage
  • Desktop: standard ~/.config or %APPDATA% JSON files.

🌍 Platform Support #

Language Verified Runtime (✅) Build Only (🛠)
TypeScript CLI (Node.js), Browser, React Native (iOS/Android) -
Dart Flutter (iOS/Android/macOS), CLI -
Go macOS, Linux, Windows, iOS, Android, CLI -
Rust macOS, iOS, Android, CLI Linux, Windows
Swift iOS, macOS, CLI -
C++ macOS, iOS, Android, CLI -
Python CLI, Web, Android -
Kotlin CLI, Web, Android -
C# CLI Android, Windows
Java CLI, Android -
Ruby CLI -
PHP CLI -

✅ Runtime Verified: Full CRUD operations verified via automated tests on actual devices/simulators.

📜 License #

MIT

0
likes
35
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

Truly Zero Config Native PolyKV for Dart/Flutter.

Documentation

API reference

License

MIT (license)

Dependencies

flutter, path, path_provider, shared_preferences

More

Packages that depend on polykv