repeat method
🔁 Repeats a function after a delay
Example: Duration(seconds: 1).repeat(() => print('tick'));
Implementation
void repeat(void Function() callback, {int times = 1}) {
for (var i = 0; i < times; i++) {
Future.delayed(this * i, callback);
}
}