storage_wrapper 1.0.0+2
storage_wrapper: ^1.0.0+2 copied to clipboard
A wrapper for shared_preferences and flutter_secure_storage that provides an unified api.
Storage Wrapper #
A wrapper for shared_preferences and flutter_secure_storage that provides an unified api.
How it works #
Calling the StorageWrapper.common()
constructor will return an instance that saves data in the SharedPreferences
using the shared_preferences
plugin.
Calling the StorageWrapper.secure()
constructor will return an instance that saves data securely using the flutter_secure_storage
plugin.
Once you got the instance, you can use the methods:
write
read
delete
containsKey
They all take the following parameters:
key
: aString
identifying the key of the valueiOptions
: aIOSOptions
object to specify iOS secure storage accessibility optionsaOptions
: aAndroidOptions
object to specify Android secure storage accessibility options
While the AndroidOptions
do not seem to be used by flutter_secure_storage
, you can find more information about the IOSOptions
here.
More docs: #
The package wraps: