hasNext property Null safety

bool hasNext

Whether there is another item after the current index.

Implementation

bool get hasNext => nextIndex != null;