encrypted_shared_preferences 1.0.4
encrypted_shared_preferences: ^1.0.4 copied to clipboard
This plugin stores Shared Preferences as encrypted values on device storage.
Encrypted Shared Preferences #
This plugin stores Shared Preferences as encrypted values. It is decrypted when retrieved. Make sure to target iOS 9.0 and later if you're going to deploy for iOS.
Usage #
Instantiate class: #
EncryptedSharedPreferences encryptedSharedPreferences = EncryptedSharedPreferences();
Save value: #
encryptedSharedPreferences.setString('sample', 'Hello, World!').then((bool success) {
if (success) {
print('success');
} else {
print('fail');
}
});
Retrieve value: #
encryptedSharedPreferences.getString('sample').then((String value) {
print(value); /// Prints Hello, World!
});
Dependencies #
This library depends on some other libraries :