for (int i = 0; i < 3; i++) {
print(i);
}
final children = <Widget>[];
for (var i = 0; i < 10; i++) {
children.add(new ListTile());
}
return new ListView(
children: children,
);
myList = [1,2,3,4,5]
for (int num in myList) {
print(num * 2);
}
void main() {
List subjects = ['Math', 'Biology', 'Economic', 'History', 'Science'];
for (String sName in subjects) {
print(sName);
}
}
void main() {
var obj = [12,13,14];
for (var prop in obj) {
print(prop);
}
}
final List<int> x = [10, 20, 30];
for (var number in x) {
debugPrint(number);
// flutter: 10
// flutter: 20
// flutter: 30
}
void main() {
var num = 5;
var factorial = 1;
for( var i = num ; i >= 1; i-- ) {
factorial *= i ;
}
print(factorial);
}
while (expression) {
Statement(s) to be executed if expression is true
}