batch method

WriteBatch batch()

Creates a write batch for batch operations.

Returns: A WriteBatch instance.

Example:

var batch = db.batch();
batch.set(docRef, data);
await batch.commit();

Implementation

WriteBatch batch() {
  String transName = generateRandomString(25);
  WriteBatch wBatch = WriteBatch(name: transName);
  return wBatch;
}