scheduleTask<T> method

Future<T> scheduleTask<T>(
  1. TaskCallback<T> task,
  2. Priority priority,
  3. ValueGetter<bool> canIgnore, {
  4. String? debugLabel,
  5. Flow? flow,
  6. int? id,
})

Implementation

Future<T> scheduleTask<T>(
    TaskCallback<T> task, Priority priority, ValueGetter<bool> canIgnore,
    {String? debugLabel, Flow? flow, int? id}) {
  final TaskEntry<T> entry =
      TaskEntry<T>(task, priority.value, canIgnore, debugLabel, flow, id: id);
  _addTask(entry);
  _ensureEventLoopCallback();
  return entry.completer.future;
}