splitByLength method
Implementation
List<List<int>> splitByLength(int length, {bool ignoreEmpty = false}) {
List<List<int>> pieces = [];
for (int i = 0; i < this.length; i += length) {
int offset = i + length;
List<int> piece = sublist(i, offset >= this.length ? this.length : offset);
pieces.add(piece);
}
return pieces;
}