Skip to content
pubscout

flutter_secure_storage

11.2.0, released 2 months ago by steenbakker.dev

Secure key-value storage using platform-specific secure mechanisms

WASM-readyRock solid
$ flutter pub add flutter_secure_storage
Source repository

What it does

Provides encrypted storage for sensitive data on Android, iOS, macOS, Windows, Linux, and Web. It uses platform keychains or custom ciphers and supports optional biometric authentication.

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

Use it when

  • Storing authentication tokens or passwords
  • Persisting small amounts of sensitive configuration
  • Implementing secure onboarding data

Skip it when

  • Storing large blobs or media
  • Using it as a general-purpose database
  • Relying on it for non-sensitive data

Strengths

  • Built-in encryption with RSA OAEP + AES-GCM
  • Cross-platform support with native APIs
  • Optional biometric authentication and accessibility options

Weaknesses

  • Web support limited to HTTPS or localhost
  • Requires native configuration (e.g., disabling backup on Android)
  • No built-in migration for schema changes

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
6

Call WidgetsFlutterBinding.ensureInitialized(); disable Android backup via AndroidManifest; use HTTPS for Web; add dependency in pubspec.yaml

final storage = FlutterSecureStorage();
await storage.write(key: 'token', value: 'abc123');
String? token = await storage.read(key: 'token');

Alternatives

Packages that do the same job and could replace flutter_secure_storage.

Works with

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