doWhileAsync<T> function

Future<bool> doWhileAsync <T>(Iterable<T> iterable, AsyncAction<bool, T> action)

Calls action for each item in iterable in turn, waiting for the Future returned by action to complete.

If the Future completes to true, iteration continues.

The Future returned completes to true if the entire iterable was processed, otherwise false.

Implementation

Future<bool> doWhileAsync<T>(
        Iterable<T> iterable, AsyncAction<bool, T> action) =>
    _doWhileAsync(iterable.iterator, action);