flat method

Iterable flat([
  1. int depth = 1
])

Implementation

Iterable flat([int depth = 1]) => depth <= 0
    ? this
    : expand((x) => x).toList().flat(depth - 1);