reset method

void reset({
  1. bool hard = false,
})

Reset the read/write offsets in the buffer.

If hard is true, reset the _recordedReadCount and _recordedWriteCount accumulators also. If hard is false (default), add the current readCount to the _recordedReadCount and writeCount to the _recordedWriteCount.

The length of the buffer does not change.

Implementation

void reset({bool hard = false}) {
  resetRead(hard: hard);
  resetWrite(hard: hard);
}