writeBytes method

  1. @override
int writeBytes(
  1. Uint8List bs, [
  2. int offset = 0,
  3. int? length
])
override

Writes the bytes into this buffer, respecting offset and length parameters.

Implementation

@override
int writeBytes(Uint8List bs, [int offset = 0, int? length]) {
  length ??= bs.length - offset;

  ensureCapacity(_position + length);
  _ioSyncPosition();
  _ioWriteBytes(bs, offset, length);
  incrementPosition(length);
  assert(_position == _ioPosition);

  return length;
}