Dart supports the most common loop constructs, the for loop supports the for in notation and it can be used inside list/collection literals starting from Dart 2.3:
| var list1 = [ |
| for(int i = 0; i < 100; i++) |
| i, |
| ]; |
| var list2 = [ |
| for(var element in list1) |
| "#$element", |
| ]; |