scheduleIteration method

  1. @override
Disposable scheduleIteration(
  1. Predicate0 callback
)
override

Schedules a callback to be executed while its return value is true.

Implementation

@override
Disposable scheduleIteration(Predicate0 callback) {
  final action = SchedulerActionCallback1((action) {
    if (callback()) {
      _scheduleAt(now, action);
    } else {
      action.dispose();
    }
  });
  _scheduleAt(now, action);
  return action;
}