Skip to main content

New site for Dart news and articles

For the latest Dart news, visit our new blog at .

Breaking Change: Iterator.hasNext is now a getter

The Dart continues their sweep through the Dart libraries, changing methods to getters. Recently, Iterator.hasNext() became Iterator.hasNext.

Florian Loitsch writes:
Starting with r14015 Iterator.hasNext is a getter and not a method anymore. 
Please adapt your code by removing the parenthesis after hasNext calls:
iterator.hasNext() -> iterator.hasNext

As always, we invite you to join our Dart mailing list, ask questions on Stack Overflow, or file feature requests on