iterate array flutter code example
Example 1: foreach loop in list in dart
main() {
List<String> list = new List<String>();
list.add('one');
list.add('two');
list.add('twelve');
list.forEach((element) => print(element));
Set<String> set = Set.from(list);
set.forEach((element) => print(element));
}
Example 2: flutter iterate over list widget
Widget getTextWidgets(List<String> strings)
{
return new Row(children: strings.map((item) => new Text(item)).toList());
}