Skip to content
pubscout

native_storage

0.4.0, released a year ago by celest.dev

Unified API for native key-value storage across platforms

WASM-ready
$ flutter pub add native_storage
Source repository

What it does

Provides a simple interface for reading and writing key-value pairs to platform-native storage such as iOS Keychain, Android SharedPreferences, and Windows Registry. It supports synchronous, asynchronous (via isolates), and secure encrypted storage.

AI-written summary of version 0.4.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Storing non-sensitive data that should persist across app restarts
  • Storing sensitive data that needs encryption and isolation from the UI thread
  • Need a single API that works on Android, iOS, macOS, Linux, Windows, and Web
  • Migrating from platform-specific storage solutions to a unified API

Skip it when

  • Using secure storage on Web, as it is only in-memory and not persistent
  • Requiring secure storage on Android versions below API 29
  • When you need advanced database features like SQL or NoSQL

Strengths

  • Cross-platform support with a single API
  • Built-in secure encryption for sensitive data
  • Asynchronous APIs via isolates to avoid UI blocking
  • Supports both local and secure storage variations

Weaknesses

  • Web secure storage is in-memory and not persistent
  • Requires native setup for secure storage on Android (min API 29)
  • No advanced database features (SQL, NoSQL)

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
12
final storage = NativeStorage();
storage.write('key', 'value');
print(storage.read('key'));

Alternatives

Packages that do the same job and could replace native_storage.

Works with

Packages commonly used together with native_storage: ones it builds on, ones built on it, and its own family.