launchOnMain

inline fun launchOnMain(crossinline block: suspend CoroutineScope.() -> Unit)

Launches a new coroutine on the Dispatchers.Main context and executes the given block.

Parameters

block

The suspend function to run.

See also