For loop in dart flutter

Standard for loop. Print i value fives times.

void main() {
   for (int i = 0; i < 5; i++) {
     print('i: ${i + 1}');
   }
 }

Check while loop

Spread the love

Comments

Leave a Reply