boxx 0.1.8
boxx: ^0.1.8 copied to clipboard
Boxx is your ultimate key-value storage plugin with built-in encryption
Example of usage boxx #
Without Encryption
late Boxx box;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await initBox();
}
Future<void> initBox() async {
box = Boxx(mode: EncryptionMode.none);
await box.initialize();
}
With Encryption
late Boxx box;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await initBox();
}
Future<void> initBox() async {
box = Boxx(mode: EncryptionMode.aes,encryptionKey: 'xxxxxxxx');
await box.initialize();
}
Usage #
Delete
await box.delete('UserData');
Get
final contents = await box.get('UserData');
Put
await box.put('UserData', response.body);
Encryption/Decryption
String t1 = box.encrypt('Hello World');
debugPrint(t1);
String t2 = box.decrypt(t1);
debugPrint(t2);