readString method

String readString(
  1. int length
)

Reads a string of the given length from the buffer.

Implementation

String readString(int length) {
  var s = utf8.decode(_list.sublist(_readPos, _readPos + length),
      allowMalformed: true);
  _readPos += length;
  return s;
}