setInterval function

Timer setInterval(
  1. Function fn,
  2. int interval
)

Implementation

Timer setInterval(Function fn, int interval) {
  return Timer.periodic(Duration(milliseconds: interval), (Timer timer) {
    fn();
  });
}