viewBytes method

Uint8List viewBytes(
  1. int length, {
  2. int offset = 0,
})

Implementation

Uint8List viewBytes(int length, {int offset = 0}) {
  if (remaining < length) {
    throw BufferReadError(
      'Cannot view $length bytes, only $remaining available',
    );
  }
  // _readOffset = length;
  return _byteData.buffer.asUint8List(_readOffset + offset, length);
}