defaultSchedulingStrategy function

bool defaultSchedulingStrategy ({int priority, SchedulerBinding scheduler })

The default SchedulingStrategy for SchedulerBinding.schedulingStrategy.

If there are any frame callbacks registered, only runs tasks with a Priority of Priority.animation or higher. Otherwise, runs all tasks.

Implementation

bool defaultSchedulingStrategy({ int priority, SchedulerBinding scheduler }) {
  if (scheduler.transientCallbackCount > 0)
    return priority >= Priority.animation.value;
  return true;
}