app_storage_kit 0.0.1 copy "app_storage_kit: ^0.0.1" to clipboard
app_storage_kit: ^0.0.1 copied to clipboard

outdated

Flutter Plugin for using both Normal Storage (Shared Preferences) and Secure Storage (Keychain / Keystore)

app_storage_kit #

app_storage_kit is a plugin for application to use both Normal Storage (shared preferences) and Secure Storage (iOS: Keychain, Android: Keystore)

Normal Storage provided by shared_preferences

Secure Storage provided by flutter_secure_storage

Usage #

Normal Storage #

import 'package:app_storage_kit/normal_storage.dart';

/// Set value "Value" with key "Key" into shared preferences
///
/// Returns [bool]
/// Returns [true] indicates set value successful
await NormalStorageKit().setValue("Value", "Key");

/// Read value from shared preferences by key "Key" 
///
/// Returns [String]
/// Returns [Null] if no value was found under [key]
await NormalStorageKit().readValue("Key");

/// Delete value in shared preferences by key "Key"
///
/// Returns [bool]
/// Returns [true] indicates delete values successful 
await NormalStorageKit().deleteValue("Key");

/// Delete all values stored in shared preference
///
/// Returns [bool]
/// Returns [true] indicates delete all values successful
await NormalStorageKit().deleteAll();

Secure Storage #

import 'package:app_storage_kit/secure_storage.dart';

/// Set value "Value" with key "Key" into keychain/keystore
///
/// Returns [bool]
/// Returns [true] indicates set value successful
await SecureStorageKit().setValue("Value", "Key");

/// Read value from keychain/keystore by key "Key" 
///
/// Returns [String]
/// Returns [Null] if no value was found under [key]
await SecureStorageKit().readValue("Key");

/// Delete value in keychain/keystore by key "Key"
///
/// Returns [bool]
/// Returns [true] indicates delete values successful 
await SecureStorageKit().deleteValue("Key");

/// Delete all values stored in keychain/keystore
///
/// Returns [bool]
/// Returns [true] indicates delete all values successful
await SecureStorageKit().deleteAll();

License #

MIT

0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Flutter Plugin for using both Normal Storage (Shared Preferences) and Secure Storage (Keychain / Keystore)

Homepage

License

unknown (LICENSE)

Dependencies

flutter, flutter_secure_storage, shared_preferences

More

Packages that depend on app_storage_kit