scheduleTask method

void scheduleTask(
  1. void cb()
)

Microtask-batched scheduling shared by scroll coalescing and scheduleWrite.

Implementation

void scheduleTask(void Function() cb) {
  _pendingTasks.add(cb);
  if (_taskFlushScheduled) return;
  _taskFlushScheduled = true;
  _schedule(_flushPendingTasks);
}