In a flutter app, I have a List of 25 items (for example int numbers) which I want to be displayed in a table of 5 rows & 5 columns. I want to use the stream API (map, take, etc.) to build each item using its own index (like in ListView.builder).
I imagine something like:
Table(children: List.generate(25, (i) => i).map((i) => MyTableCell(i)).toList().take(5, into(TableRow()))) but of course this won't do...
I really don't want to use for loops for that purpose . Any ideas?
I hope that I explained myself well. I'll add details if needed. Thank you.