read method

Uint8List read(
  1. int length
)

Implementation

Uint8List read(int length) {
  if (offset + length > buffer.lengthInBytes) {
    throw RangeError("Reached to the end of buffer");
  }

  final bytes = buffer.sublist(offset, offset + length);
  offset += length;
  return bytes;
}