next method

E? next()

Advances one and returns it, or null at end.

Implementation

E? next() {
  if (!moveNext()) return null;
  return _items[_index];
}