boxx 0.0.7 copy "boxx: ^0.0.7" to clipboard
boxx: ^0.0.7 copied to clipboard

Boxx is a lightweight and blazing fast key-value database written in pure Dart

example/README.md

Example of usage boxx #

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);
2
likes
0
points
137
downloads

Publisher

verified publisherworkforceanalytics.co.za

Weekly Downloads

Boxx is a lightweight and blazing fast key-value database written in pure Dart

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

encrypt, flutter, indexed_db, web

More

Packages that depend on boxx