Skip to content
pubscout

flutter_locker

2.2.0, released a year ago by infinum.com

Secures secrets in device keychain using biometric authentication.

WASM-ready
$ flutter pub add flutter_locker
Source repository

What it does

Allows saving, retrieving, and deleting secrets in the device's secure storage (keychain/keystore) protected by biometric authentication like Fingerprint, Touch ID, or Face ID. It provides check methods for biometric capabilities and maps common errors to LockerException.

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

Use it when

  • You need to store sensitive information like auth tokens or credentials securely on the device.
  • You want access to stored secrets to be guarded by biometric prompts (Face ID, Touch ID, Fingerprint).

Skip it when

  • You need non-secure standard key-value storage without biometrics.
  • You are targeting platforms other than Android and iOS.

Strengths

  • Combines secure storage and biometric authentication in a single plugin.
  • Exposes specific error reasons via LockerException.
  • Supports Swift Package Manager.

Weaknesses

  • Requires manual native setup (modifying MainActivity on Android and adding usage descriptions in Info.plist for iOS).
  • Limited to Android and iOS platforms.

Setup

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

On iOS, add NSFaceIDUsageDescription to Info.plist. On Android, ensure MainActivity extends FlutterFragmentActivity.

await FlutterLocker.save(SaveSecretRequest(
  key: 'key',
  secret: 'secret',
  androidPrompt: AndroidPrompt(title: 'Authenticate', cancelLabel: 'Cancel'),
));

Alternatives

Packages that do the same job and could replace flutter_locker.

  • local_auth

    If you only need local biometric authentication without integrated secure key-value secret storage.