coroutineScope

fun Lifecycle.coroutineScope(): CoroutineScope

Returns CoroutineScope that is tied to Lifecycle. The coroutine scope is canceled when Lifecycle is destroyed.