timer function

Observable<int> timer({
  1. Duration delay = Duration.zero,
  2. Duration? period,
  3. Scheduler? scheduler,
})

An Observable that starts emitting after delay and that emits an ever increasing numbers after each period thereafter.

Implementation

Observable<int> timer(
        {Duration delay = Duration.zero,
        Duration? period,
        Scheduler? scheduler}) =>
    TimerObservable(delay, period, scheduler ?? defaultScheduler);