boxx 0.1.0
boxx: ^0.1.0 copied to clipboard
Boxx is a lightweight and blazing fast key-value database written in pure Dart
Boxx is a lightweight and blazing fast key-value database written in pure Dart.
Features #
Boxx is a lightweight storage solution with optional encryption built in. Its simple, powerful, & intuitive API get's you up and running in no time.
Getting started #
Without Encryption
late Boxx box;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await initBox();
}
initBox() async {
if (kIsWeb) {
box = Boxx(path: '');
} else {
final directory = await getApplicationDocumentsDirectory();
box = Boxx(path: directory.path);
}
}
With Encryption
late Boxx box;
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await initBox();
}
initBox() async {
if (kIsWeb) {
box = Boxx(path: '',encryptionKey: 'xxxxxxxx',mode: EncryptionMode.aes);
} else {
final directory = await getApplicationDocumentsDirectory();
box = Boxx(path: directory.path,encryptionKey: 'xxxxxxxx',mode: EncryptionMode.aes);
}
}
Usage #
Delete
box.boxx.delete('UserData');
Get
final contents = await box.boxx.get('UserData');
Put
box.boxx.put('UserData', response.body);
Additional information #
Box supports 2 Encryption Algorithms 1) AES Algorithms 2) Fernet Algorithms