schedulePeriodic method

  1. @override
Disposable schedulePeriodic(
  1. Duration duration,
  2. Callback1<Disposable> callback
)
override

Schedules a callback to be executed periodically every duration.

Implementation

@override
Disposable schedulePeriodic(
        Duration duration, Callback1<Disposable> callback) =>
    _scheduleAt(now.add(duration), SchedulerActionCallback1((action) {
      callback(action);
      if (!action.isDisposed) {
        _scheduleAt(now.add(duration), action);
      }
    }));