Skip to content
Sudhi S edited this page Jul 28, 2026 · 2 revisions

native_datastore Wiki

A modern, type-safe, async key-value store for Flutter — Jetpack DataStore on Android and UserDefaults on iOS, plus an encrypted SecureDatastore for secrets.

📦 pub.dev · 📖 README (canonical, full API) · 🐛 Issues

This wiki holds task-focused guides. The README remains the source of truth for the complete API reference and changelog.

Guides

At a glance

final store = NativeDatastore();
await store.setString('username', 'sudhi');
final name = await store.getString('username');

final secure = SecureDatastore();
await secure.setString('refresh_token', jwt);   // encrypted at rest
Use it for Class
Preferences, flags, cached values NativeDatastore
Tokens, keys, secrets (encrypted) SecureDatastore

Supported platforms: Android (minSdk 21; secure store needs API 23+) and iOS (13.0+). Not web or desktop.

Clone this wiki locally