coroutineScope

fun LifecycleOwner.coroutineScope(context: CoroutineContext): CoroutineScope(source)

Extension function to create a CoroutineScope on the current Lifecycle.

Return

a lifecycle-aware CoroutineScope

Parameters

context

the context used for the CoroutineScope.