I wasn't able to find an answer to this. Hope any of you can explain if there is any difference beyond that one of them looks prettier.
Let's say I have a list of Strings (just an example, any list use case fits)
final strings = ['string 1', 'string 2', 'string 3'];
And I want to render those strings in some Text widgets.
Doing it with a for loop, like this:
Column(
children: [
for(final string in strings)
Text(string),
],
);
Or doing it with map, like this:
Column(
children: strings.map((String string) => Text(string)).toList()
);
Is there any difference in performance or something else?
