List<String> chunk(int size) { List<String> chunks = []; for (var i = 0; i < length; i += size) { chunks.add(substring(i, min(i + size, length))); } return chunks; }