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

Fast Simple Secure NoSQL Storage

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

Features #

Box 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 Box box;

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await initBox();
}



initBox() async {
  if (kIsWeb) {
    box = Box(path: '');
  } else {
    final directory = await getApplicationDocumentsDirectory();
    box = Box(path: directory.path);
  }
}

With Encryption

late Box box;

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  await initBox();
}



initBox() async {
  if (kIsWeb) {
    box = Box(path: '',encryptionKey: 'xxxxxxxx',mode: EncryptionMode.aes);
  } else {
    final directory = await getApplicationDocumentsDirectory();
    box = Box(path: directory.path,encryptionKey: 'xxxxxxxx',mode: EncryptionMode.aes);
  }
}

Usage #

Delete

    box.delete('UserData');

Get

 final contents = await box.get('UserData');

Put

box.put('UserData', response.body);

Additional information #

Box supports 2 Encryption Algorithms 1) AES Algorithms 2) Fernet Algorithms

1
likes
140
points
24
downloads

Publisher

verified publisherworkforceanalytics.co.za

Weekly Downloads

Fast Simple Secure NoSQL Storage

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

encrypt, flutter

More

Packages that depend on boxx