W3cubDocs

/Dart 2

current property

E current

Returns the current element.

Returns null if the iterator has not yet been moved to the first element, or if the iterator has been moved past the last element of the Iterable.

The current getter should keep its value until the next call to moveNext, even if an underlying collection changes. After a successful call to moveNext, the user doesn't need to cache the current value, but can keep reading it from the iterator.

Implementation

E get current;

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-core/Iterator/current.html