How do I use a loop inside a widget?
I want to be able to:
RichText(
text: TextSpan(
text: 'Itemlist\n',
children: <TextSpan>[
for(i = 0; i< items.length; i++){
TextSpan( text: 'item' +i +': ',),
TextSpan( text: 'item[i].value' +i +'\n',),
}
]
)
it is importaint that i could have several lines of code inside the loop.