startBatch method
This function will create a Batch
object, this allowed you to do some sort of transaction control.
example:
var b = await jsonStore.startBatch();
await jsonStore.setItem('key', value1, batch: b);
await jsonStore.setItem('key', value2, batch: b);
await jsonStore.setItem('key', value3, batch: b);
await jsonStore.commitBatch(b);
Implementation
Future<Batch> startBatch() async {
final Database db = await _databaseFuture;
return db.batch();
}