flutter_secure_storage 3.2.1+1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 99

flutter_secure_storage #

A Flutter plugin to store data in secure storage:

  • Keychain is used for iOS
  • AES encryption is used for Android. AES secret key is encrypted with RSA and RSA key is stored in KeyStore

Note KeyStore was introduced in Android 4.3 (API level 18). The plugin wouldn't work for earlier versions.

Getting Started #

// Create storage
final storage = new FlutterSecureStorage();

// Read value 
String value = await storage.read(key: key);

// Read all values
Map<String, String> allValues = await storage.readAll();

// Delete value 
await storage.delete(key: key);

// Delete all 
await storage.deleteAll();

// Write value 
await storage.write(key: key, value: value);

Configure Android version #

In [project]/android/app/build.gradle set minSdkVersion to >= 18.

android {
    ...
    
    defaultConfig {
        ...
        minSdkVersion 18
        ...
    }

}

Note By default Android backups data on Google Drive. It can cause exception java.security.InvalidKeyException:Failed to unwrap key. You need to

[3.2.1]

[3.2.0]

  • Breaking change. Migrate from the deprecated original Android Support Library to AndroidX. This shouldn't result in any functional changes, but it requires any Android apps using this plugin to also migrate if they're using the original support library. Thanks I-am-original.
  • Enable StrongBox on Android devices that support it. Thanks bbedward.

[3.1.3]

  • Fix Android 9.0 Pie KeyStore exception. Thanks hacker1024

[3.1.2]

  • Added recreating secretKey if its decoding failed. Fix for unwrap key. Thanks hnvn.

[3.1.1]

  • Suppress warning about unchecked operations when compiling for Android.

[3.1.0]

  • Added readAll and deleteAll.

[3.0.0]

  • Breaking change. Changed payloads encryption for Android from RSA to AES, AES secret key is encrypted with RSA.

[2.0.0]````

  • Breaking change. Changed key alias to fix Android 4.4.2 issue. The plugin isn't able to get previous stored data.

[1.0.0]

  • Bump version

[0.0.1]

  • Initial release

example/README.md

flutter_secure_storage_example #

Demonstrates how to use the flutter_secure_storage plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_secure_storage: ^3.2.1+1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_secure_storage/flutter_secure_storage.dart';
  
Version Uploaded Documentation Archive
3.2.1+1 Mar 30, 2019 Go to the documentation of flutter_secure_storage 3.2.1+1 Download flutter_secure_storage 3.2.1+1 archive
3.2.1 Mar 30, 2019 Go to the documentation of flutter_secure_storage 3.2.1 Download flutter_secure_storage 3.2.1 archive
3.2.0 Feb 14, 2019 Go to the documentation of flutter_secure_storage 3.2.0 Download flutter_secure_storage 3.2.0 archive
3.1.3 Jan 21, 2019 Go to the documentation of flutter_secure_storage 3.1.3 Download flutter_secure_storage 3.1.3 archive
3.1.2 Sep 21, 2018 Go to the documentation of flutter_secure_storage 3.1.2 Download flutter_secure_storage 3.1.2 archive
3.1.1 Jul 16, 2018 Go to the documentation of flutter_secure_storage 3.1.1 Download flutter_secure_storage 3.1.1 archive
3.1.0 May 19, 2018 Go to the documentation of flutter_secure_storage 3.1.0 Download flutter_secure_storage 3.1.0 archive
3.0.0 Apr 14, 2018 Go to the documentation of flutter_secure_storage 3.0.0 Download flutter_secure_storage 3.0.0 archive
2.0.0 Mar 1, 2018 Go to the documentation of flutter_secure_storage 2.0.0 Download flutter_secure_storage 2.0.0 archive
1.0.0 Feb 8, 2018 Go to the documentation of flutter_secure_storage 1.0.0 Download flutter_secure_storage 1.0.0 archive

All 11 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
98
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
99
Learn more about scoring.

We analyzed this package on Jun 12, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.1
  • pana: 0.12.17
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <3.0.0
flutter 0.0.0
meta ^1.1.2 1.1.6 1.1.7
Transitive dependencies
collection 1.14.11
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8