peek method
E?
peek()
Returns next element without consuming, or null at end.
Implementation
E? peek() {
final nextIndex = _index + 1;
if (nextIndex >= _items.length) return null;
return _items[nextIndex];
}
Returns next element without consuming, or null at end.
E? peek() {
final nextIndex = _index + 1;
if (nextIndex >= _items.length) return null;
return _items[nextIndex];
}