moveNext method
- @override
override
Moves to the next element.
Returns true if current contains the next element. Returns false if no elements are left.
It is safe to invoke moveNext even when the iterator is already positioned after the last element. In this case moveNext returns false again and has no effect.
A call to moveNext
may throw if iteration has been broken by
changing the underlying collection.
Implementation
@override
bool moveNext() {
// PathMetric isn't a normal iterable - it's already initialized to its
// first Path. Should only call _moveNext when done with the first one.
if (_firstTime == true) {
_firstTime = false;
return true;
} else if (_pathMetric?._moveNext() == true) {
return true;
}
_pathMetric = null;
return false;
}