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;

  final pos = _position;
  ensureCapacity(pos + length);

  _bytes.setRange(pos, pos + length, bs, offset);
  incrementPosition(length);

  return length;
}