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