cancel abstract method
Future cancel(Cancels the stream iterator (and the underlying stream subscription) early.
The stream iterator is automatically canceled if the moveNext future completes with either false
or an error.
If you need to stop listening for values before the stream iterator is automatically closed, you must call cancel to ensure that the stream is properly closed.
If moveNext has been called when the iterator is canceled, its returned future will complete with false
as value, as will all further calls to moveNext.
Returns a future if the cancel-operation is not completed synchronously. Otherwise returns null
.
Source
Future cancel();
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-async/StreamIterator/cancel.html