read method

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

Implementation

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