With the following code, I am trying to add a new Text widget for each player:
Widget build(BuildContext context) {
return Container(
child: Row(children: [
Column(
children: [
for (var player in _players) {Text(player.name)}
],
)
]));
}
This results in the following error:
The element type 'Set' can't be assigned to the list type 'Widget'.
What am I doing wrong?