addTask

abstract fun <T> addTask(definition: ProgressBarDefinition<T>, context: T, total: Long? = null, completed: Long = 0, start: Boolean = true, visible: Boolean = true): ProgressTask<T>

Add a new task to the progress bar with the given definition and context.

Parameters

definition

The definition of the progress bar to add

context

The context to pass to the task

total

The total number of steps needed to complete the progress task, or null if it is indeterminate.

completed

The number of steps currently completed in the progress task.

start

If true, start the task immediately.

visible

If false, the task will not be drawn to the screen.