Check out example codes for "dart loop". It will help you in understanding the concepts better.

Code Example 1

for (int i = 0; i < 3; i++) {
	print(i);
}

Code Example 2

void main() { 
   var obj = [12,13,14]; 
   
   for (var prop in obj) { 
      print(prop); 
   } 
}

Code Example 3

void main() { 
   var num = 5; 
   var factorial = 1; 
   
   for( var i = num ; i >= 1; i-- ) { 
      factorial *= i ; 
   } 
   print(factorial); 
}

Learn ReactJs, React Native from akashmittal.com