storage_repository 0.0.1 copy "storage_repository: ^0.0.1" to clipboard
storage_repository: ^0.0.1 copied to clipboard

outdated

A new Flutter package project.

Storage repository #

Abstraction for persisting and reading data to platform specific storage.

Usage #

Future  main() async {
final storageRepository = StorageRepository();
//Or use like this to support dependency injection
IStorageRepository concreteStorageRepository = StorageRepository();

//init must be called
await storageRepository.init();

//or like this(if you want to separate storage by some parameter)
await storageRepository.init(prefix: 'current_user_id');

storageRepository.set('key', 'dynamic value');

final value = storageRepository.get('key');

bool containsKey = storageRepository.containsKey('key');

storageRepository.delete('key');

storageRepository.log();

storageRepository.clear();
}
6
likes
0
pub points
64%
popularity

Publisher

unverified uploader

A new Flutter package project.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, hive, hive_flutter

More

Packages that depend on storage_repository