Source
static Future tick(int times, Interval interval, action()) async { for (var i = 1; i <= times; i++) { await new Future.delayed( new Duration(milliseconds: interval.inMilliseconds)); await action(); } }
static Future tick(int times, Interval interval, action()) async { for (var i = 1; i <= times; i++) { await new Future.delayed( new Duration(milliseconds: interval.inMilliseconds)); await action(); } }