bytesView property

Uint8List get bytesView

Convenience view of the first length bytes.

Note: this allocates a typed-data view.

Implementation

Uint8List get bytesView {
  _ensureValid();
  if (length == 0) return Uint8List(0);
  if (length == _buffer.length) return _buffer;
  return Uint8List.sublistView(_buffer, 0, length);
}