reset method

void reset({
  1. int? schemaId,
  2. int? schemaVersion,
})

Discards the contents while keeping the configured capacity.

Implementation

void reset({int? schemaId, int? schemaVersion}) {
  _sink = DocSink(capacity: _capacity);
  _open = false;
  _finished = false;
  if (schemaId != null) this.schemaId = schemaId;
  if (schemaVersion != null) this.schemaVersion = schemaVersion;
}