times method
void
times(
- void action()
Executes action this times. Equivalent to a for loop.
3.times(() => print('hi')); // hi hi hi
Implementation
void times(void Function() action) {
for (var i = 0; i < this; i++) {
action();
}
}