launchMain

fun LifecycleOwner.launchMain(block: suspend CoroutineScope.() -> Unit): Job(source)

Extension function to launch a CoroutineScope on the current Lifecycle using the platform mainDispatcher.

Return

a Job on a lifecycle-aware CoroutineScope on mainDispatcher

See also