batch method Null safety

WriteBatch batch()

Returns a WriteBatch, used for performing multiple writes as a single atomic operation.

Unlike Transactions, WriteBatches are persisted offline and therefore are preferable when you don’t need to condition your writes on read data.

Implementation

WriteBatch batch() {
  return WriteBatch._(this, _delegate.batch());
}