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

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

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

0
likes
160
points
24
downloads

Publisher

verified publisherworkforceanalytics.co.za

Weekly Downloads

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

encrypt, flutter

More

Packages that depend on boxx