getBytes method

Uint8List getBytes(
  1. int length
)

Implementation

Uint8List getBytes(int length) {
  if (_position + length > _limit) throw RangeError("buffer underflow: need $length, have $remaining");
  final Uint8List out = Uint8List.sublistView(_bytes, _position, _position + length);
  _position += length;
  return Uint8List.fromList(out);
}