perks 1.0.0 copy "perks: ^1.0.0" to clipboard
perks: ^1.0.0 copied to clipboard

Perks is a simple-to-use persistent data storage.

Perks #

📦 Perks is a simple-to-use persistent data storage.

pub package Tests

Usage #

  • Adapters take care of read and write operations.
  • Boxes abstract adapters to provide a way to perform operations on the data.

Available Adapters #

  • PerksFileAdapter - Asynchronous file based storage.
  • PerksFileSyncAdapter - Synchronous file based storage.
  • PerksMemoryAdapter - Synchronous memory based storage.

Available Boxes #

  • PerksNameValueBox - Asynchronous Name-Value (or Key-Value) paired database schema.
  • PerksNameValueSyncBox - Synchronous Name-Value (or Key-Value) paired database schema.
  • PerksStringBox - Asynchronous storage where data is stored as a single string.
  • PerksStringSyncBox - Synchronous storage where data is stored as a single string.

Example #

import 'package:perks/perks.dart';

final PerksNameValueBox<String> database = PerksNameValueBox<String>(
    adapter: PerksFileAdapter('data.db'),
);

await database.set('hello', 'world');
print('Value of hello: ${await database.get('hello')}');

LICENSE #

MIT

0
likes
100
pub points
39%
popularity

Publisher

unverified uploader

Perks is a simple-to-use persistent data storage.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on perks