Skip to content

Upgrading flutter_secure_storage 2 to 3

Breaking2.0.0 → 3.3.5Breaking2Platform1New5Changed1Fixed13Other2

BreakingUpgrade verdict

2 breaking changes and a platform requirement change.

  • Android apps that use this plugin must switch from the old Android Support Library to AndroidX.
  • On Android, stored secrets are now encrypted with a faster AES key, and that AES key is itself protected with RSA. Data saved by older versions may not be readable after upgrading.
  • Android apps using this package must now meet a minimum Android SDK version.
3 items need code or config changes

Dart SDK requirement changed in 3.3.5: >=1.8.0 <3.0.0 → >=2.1.0 <3.0.0.

Requires Flutter >=1.20.0 <2.0.0 from 3.3.4 (none stated before).

Breaking2
Migrates from the deprecated Android Support Library to AndroidX, requiring Android apps using the plugin to also migrate.
Changes Android payload encryption from RSA to AES, with the AES secret key encrypted using RSA.
Platform1
Adds a minimum sdk requirement on AndroidManifest.
AndroidManifest

Generated by DepDelta from published Dart source. Not mixed with prose notes.

  • changed: method FlutterSecureStorage.delete({@required String key}): Future → method FlutterSecureStorage.delete( {@required String key, IOSOptions iOptions, AndroidOptions aOptions}): Future<void>
  • changed: method FlutterSecureStorage.read({@required String key}): Future → method FlutterSecureStorage.read( {@required String key, IOSOptions iOptions, AndroidOptions aOptions}): Future<String>
  • changed: method FlutterSecureStorage.write({@required String key, @required String value}): Future → method FlutterSecureStorage.write( {@required String key, @required String value, IOSOptions iOptions, AndroidOptions aOptions}): Future<void>
  • added: class AndroidOptions extends Options
  • added: class IOSOptions extends Options
  • added: class Options: abstract
  • added: ctor FlutterSecureStorage()
  • added: ctor IOSOptions( {String groupId, IOSAccessibility accessibility = …})
  • added: enum IOSAccessibility
  • added: get Options.params: Map<String, String>
  • added: member IOSAccessibility.first_unlock
  • added: member IOSAccessibility.first_unlock_this_device
  • added: member IOSAccessibility.passcode
  • added: member IOSAccessibility.unlocked
  • added: member IOSAccessibility.unlocked_this_device
  • added: method FlutterSecureStorage.containsKey( {@required String key, IOSOptions iOptions, AndroidOptions aOptions}): Future<bool>
  • added: method FlutterSecureStorage.deleteAll({IOSOptions iOptions, AndroidOptions aOptions}): Future<void>
  • added: method FlutterSecureStorage.readAll( {IOSOptions iOptions, AndroidOptions aOptions}): Future<Map<String, String>>