Unified API for in-memory, local storage, indexed db, and websql

Future-based APIs

Tests

Example Web UI app with IndexedDB





Here is an example of using Lawndart to open, clear, save, and retrieve data:





var store = new IndexedDbAdapter('teststore', 'testdb'); store.open() .then((_) => store.nuke()) .then((_) => store.save(id, "hello")) .then((_) => store.save("is fun", "dart")) .then((_) => store.getByKey("hello")) .then((value) => query('#$id').text = value);

name: your_cool_app dependencies: lawndart: any

Lawndart was initially inspired by lawnchair , a JavaScript library that helps to provide a consistent interface across client-side storage. However, Lawndart evolved and adopted a Future based API for more composable methods.Available in version 0.2.0:Thanks to Futures, the APIs can be chained. All methods in Lawndart return a Future for asynchronous behavior.You can install Lawndart from pub , Dart's package manager. Simply add a dependency to lawndart in your pubspec.yaml file:Lawndart is open source and hosted on Github . Pull requests are much appreciated, as are bugs and feature requests.Please try Lawndart and let me know what you think!