flutter_keychain
3.0.1, released 8 months ago by appmire.be
Secure storage of strings via iOS Keychain and Android Keystore.
WASM-ready
What it does
Provides a Flutter plugin to securely store, retrieve, remove, and clear string values using native platform security mechanisms like Keychain on iOS and Keystore on Android. It supports optional iOS access groups and item labels.
AI-written summary of version 3.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to store sensitive string data like auth tokens or credentials securely on the device
- You target iOS and Android and want native secure storage integration
Skip it when
- You need to store complex object types without serializing them to strings first
- You need cross-platform secure storage for platforms beyond Android and iOS (like web or desktop)
Strengths
- Leverages native iOS Keychain and Android Keystore mechanisms
- Supports configuration options for iOS access groups and item labels
- Handles threading issues on Android to prevent ANR errors
Weaknesses
- Only supports storing strings; other types require manual serialization
- Limited platform support (primarily Android and iOS)
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
On Android, set minSdkVersion to >= 18 in build.gradle.
import 'package:flutter_keychain/flutter_keychain.dart';
// Get value
var value = await FlutterKeychain.get(key: "key");
// Put value
await FlutterKeychain.put(key: "key", value: "value");Alternatives
Packages that do the same job and could replace flutter_keychain.
- flutter_secure_storage
More widely used feature-rich alternative for secure storage across multiple platforms.
93Compare