single_storage_base 1.0.0+1

Dart native js
Flutter Android iOS web

A platform agnostic key-value storage interface for Dart & Flutter.

single_storage_base #

extra_pedantic on pub.dev Travis CI Codecov License Pub.dev Github Stars Twitter Follow GitHub Follow

Platform agnostic storage interface for Dart.

class MyStorage extends StorageBase<String> {
  @override
  Future<bool> exists(String key) async {
    return false;
  }

  @override
  Future<String> get(String key) async {
    return "todo";
  }

  @override
  String location(String key) {
    return key;
  }

  @override
  Future<void> remove(String key) async {
    // remove
  }

  @override
  Future<void> set(String key, String value) async {
    // set
  }
}

final storage = MyStorage();
final storageAt = storage.at("somewhere");
final storageSomewhereElse = storage.map((key) => "somewhere/$key");
0
likes
110
pub points
0%
popularity

Publisher

modulovalue.com

A platform agnostic key-value storage interface for Dart & Flutter.

Homepage
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on single_storage_base