performBatch method

Future<void> performBatch(
  1. dynamic action(
    1. Batch batch
    )
)

Implementation

Future<void> performBatch(Function(Batch batch) action) async {
  final batch = _database.batch();
  action(batch);
  await batch.commit();
}