read method

dynamic read([
  1. int howMany = 1
])

Return the next howMany items, or as many as there are remaining. Advance the stream by that many positions.

Implementation

dynamic read([int howMany = 1]) {
  var result = peek(howMany);
  index += howMany;
  return result;
}