recursion_iterator 0.0.4
recursion_iterator: ^0.0.4 copied to clipboard

A new Flutter package.

recursion_iterator #

A new Flutter package, iterate a iterator and sub iterator.

Usage #

final iterable = RecursionIterable<int>(() {
  int index = 0;
  return RecursionIterator((iter) {
    if (index < 3) {
      int i = ++index;
      bool runOver = false;
      return iter.iterator(RecursionIterator((iter) {
        if (runOver) {
          return iter.stop;
        } else {
          runOver = true;
          return iter.iterable([1 * i, 2 * i, 3 * i]);
        }
      }));
    } else {
      return iter.stop;
    }
  });
});
print(iterable.toList()); //[1,2,3,2,4,6,3,6,9]
0
likes
70
pub points
0%
popularity

A new Flutter package.

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on recursion_iterator