run method
- void batchHandler(
- FSBatchHandler batch
Runs a batch in Firestore.
Implementation
Future<void> run(void Function(FSBatchHandler batch) batchHandler) async {
final batch = FS.instance.batch();
final inliner = FSBatchInliner(batchHandler);
inliner.create = FSBatchCreateDelegate.init(batch);
inliner.update = FSBatchUpdateDelegate.init(batch);
inliner.delete = FSBatchDeleteDelegate.init(batch);
await inliner.handleBatch();
await batch.commit();
}