BaseHUD

abstract class BaseHUD(coroutineScope: CoroutineScope) : CoroutineScope

Class showing a loading indicator HUD.

Parameters

coroutineScope

The CoroutineScope managing the HUD lifecycle

Inheritors

Constructors

Link copied to clipboard
constructor(coroutineScope: CoroutineScope)

Types

Link copied to clipboard

Builder class for creating a BaseHUD

Properties

Link copied to clipboard
Link copied to clipboard
abstract val hudConfig: HudConfig

The HudConfig of the HUD being presented.

Link copied to clipboard
abstract val isVisible: Boolean

Returns true if indicator is visible

Link copied to clipboard

The HUDStyle of the HUD.

Link copied to clipboard

The title of the HUD.

Functions

Link copied to clipboard
abstract suspend fun dismiss(animated: Boolean = true)

Dismisses the indicator

Link copied to clipboard
fun BaseHUD.dismissAfter(timeMillis: Long, animated: Boolean = true): BaseHUD

Dismisses the indicator after timeMillis milliseconds

fun BaseHUD.dismissAfter(duration: Duration, animated: Boolean = true): BaseHUD

Dismisses the indicator after duration

Link copied to clipboard
abstract suspend fun present(animated: Boolean = true): BaseHUD

Presents as indicator

Link copied to clipboard
suspend fun <T> BaseHUD.presentDuring(animated: Boolean = true, block: suspend BaseHUD.() -> T): T

Presents and keep presenting the indicator during block execution, hides view after block finished.