simple_storage_plugin 0.0.2 copy "simple_storage_plugin: ^0.0.2" to clipboard
simple_storage_plugin: ^0.0.2 copied to clipboard

PlatformAndroid

A plugin for storing data using shared preferences in Android. Stored data is encrypted using AES.

simple_storage_plugin #

A plugin for storing data using shared preferences in Android. It is highly dependent on simple_signing_plugin. Stored data is encrypted using AES. In order for the package to function properly, it is required to protect a device with a screen lock.

Features #

This plugin contains following methods:

  1. writeData - saves user's input and key into shared preferences. Authentication is required to perform this action.
  2. readData - reads data from shared preferences saved under input key. If no data under such key is present, an exception is thrown.
  3. deleteData - deletes data from shared preferences saved under input key.
  4. editData - edits data in shared preferences saved under input key. Authentication is required to perform this action.

Usage #

//Writing data example
String _data = 'Data';
String _key = 'Key';
var result = await SimpleStoragePlugin.writeData(_key, _data); //returns true if everything goes fine. Can throw a SharedPreferencesException or DeviceNotSecuredException
//Reading data example
String _key = 'Key';
var result = await SimpleStoragePlugin.readData(_key); //returns data written under key if everything goes fine. Can throw a InvalidSignatureException, DeviceNotSecuredException or NoKeyInStorageException
//Deleting data example
String _key = 'Key';
var result = await SimpleStoragePlugin.deleteData(_key); //returns true if everything goes fine. Can throw a SharedPreferencesException or DeviceNotSecuredException
//Editing data example
String _data = 'Data';
String _key = 'Key';
var result = await SimpleStoragePlugin.editData(_key, _data); //returns true if everything goes fine. Can throw a SharedPreferencesException or DeviceNotSecuredException
0
likes
160
pub points
0%
popularity

Publisher

verified publisherhumancolossus.org

A plugin for storing data using shared preferences in Android. Stored data is encrypted using AES.

Repository (GitHub)
View/report issues

Documentation

API reference

License

EUPL-1.2 (license)

Dependencies

flutter, simple_signing_plugin

More

Packages that depend on simple_storage_plugin