Finap Secure Shared Preferences
Features
Read and write data into shared preferences in a Secured manner
Getting started
Run this command to install
flutter pub add finap_secure_shared_preferences
Usage
Read Data
Future<String?> read(String key) async {
return await storage?.read(key: key);
}
Read All Data
Future<Map<String, String>?> readAll() async {
return await storage?.readAll();
}
Delete Data
Future<void> delete(String key) async {
await storage?.delete(key: key);
}
Delete All Data
Future<void> deleteAll() async {
await storage?.deleteAll();
}
Write Data
Future<void> write(String key, String value) async {
if (Platform.isIOS) {
final options = IOSOptions(accessibility: IOSAccessibility.first_unlock);
await storage?.write(key: key, value: value, iOptions: options);
}
await storage?.write(key: key, value: value);
}