read method
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;
}