flutter set interval code example
Example 1: setinterval flutter
// runs every 1 second
Timer.periodic(new Duration(seconds: 1), (timer) {
debugPrint(timer.tick.toString());
});
Example 2: timer in flutter
Future.delayed(Duration(seconds: 1), () {
print('yo hey');
});