single_item_storage 1.0.4+1 single_item_storage: ^1.0.4+1 copied to clipboard
A single item storage abstraction with CRUD operations. Use it for abstracting (complex) storage implementations, testing, and quickly swapping implementations.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add single_item_storage
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
single_item_storage: ^1.0.4+1
Alternatively, your editor might support dart pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:single_item_storage/cached_storage.dart';
import 'package:single_item_storage/memory_storage.dart';
import 'package:single_item_storage/observed_storage.dart';
import 'package:single_item_storage/storage.dart';
import 'package:single_item_storage/stub_storage.dart';