chunks method
Splits into chunks of the specified size.
Example:
final res = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].chunks(3);
Result:
[[1, 2, 3], [4, 5, 6], [7, 8, 9], [10]]
Implementation
Iterable<List<E>> chunks(int size) => partition(this, size);