ProgressTask

Properties

Link copied to clipboard
abstract val completed: Long

The number of units of work that have been completed

Link copied to clipboard
abstract val context: T

The context is used to pass custom information to the task

Link copied to clipboard
abstract val finished: Boolean

true if this task's completed count is equal to its total

Link copied to clipboard
abstract val id: TaskId

The unique id of this task

Link copied to clipboard
abstract val paused: Boolean

Whether the task is currently paused

Link copied to clipboard
abstract val started: Boolean

Whether the task has been started

Link copied to clipboard
abstract val total: Long?

The total number of units of work, or null if the total is unknown

Link copied to clipboard
abstract val visible: Boolean

Whether the task should be visible in the progress bar

Functions

Link copied to clipboard
fun ProgressTask<*>.advance(amount: Long = 1)
fun ProgressTask<*>.advance(amount: Number)

Advance the completed progress of this task by amount.

Link copied to clipboard
abstract fun makeState(): ProgressState<T>

Create a ProgressState for this task's current state

Link copied to clipboard
abstract fun reset(start: Boolean = true, block: ProgressTaskUpdateScope<T>.() -> Unit = {})

Reset the task so its completed count is 0 and its clock is reset.

Link copied to clipboard
abstract fun update(block: ProgressTaskUpdateScope<T>.() -> Unit)

Update the task's state.

Link copied to clipboard
fun ProgressTask<*>.update(completed: Long)
fun ProgressTask<*>.update(completed: Number)

Set the completed progress of this task to completed.