tick static method

Stream<int> tick({
  1. int interval = 1,
})

Returns a stream of ticks. interval is the time between ticks in seconds.

Implementation

static Stream<int> tick({int interval = 1}) {
  return Stream.periodic(Duration(seconds: interval), (x) => x);
}