TaskProvider<T extends Task> constructor

TaskProvider<T extends Task>({
  1. FutureOr<List<Task>> provideTasks(
    1. CancellationToken
    )?,
  2. FutureOr<Task> resolveTask(
    1. Task,
    2. CancellationToken
    )?,
})

Implementation

factory TaskProvider({
  _i4.FutureOr<_i2.List<_i3.Task>> Function(_i3.CancellationToken)?
      provideTasks,
  _i4.FutureOr<_i3.Task> Function(
    _i3.Task,
    _i3.CancellationToken,
  )? resolveTask,
}) =>
    TaskProvider._(
      provideTasks: provideTasks == null
          ? null
          : _i5.allowInterop(
              (p0) => _i6.Promise.futureOr(() => provideTasks(p0))),
      resolveTask: resolveTask == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
            ) =>
              _i6.Promise.futureOr(() => resolveTask(
                    p0,
                    p1,
                  ))),
    );