read method

List<T> read(
  1. int length
)

Implementation

List<T> read(int length) {
  final list = <T>[];

  for (int i = 0; i < length && _buffer.isNotEmpty; i++) {
    list.add(_buffer.removeFirst());
    _bytesRead++;
  }

  return list;
}