read method

Uint8List read(
  1. int length, [
  2. bool allocNew = true
])

Implementation

Uint8List read(int length, [bool allocNew = true]) {
  var view =
      Uint8List.view(buffer.buffer, buffer.offsetInBytes + readIndex, length);
  readIndex += length;
  return allocNew ? Uint8List.fromList(view) : view;
}