observeOnCoroutine

fun <T> LiveData<T>.observeOnCoroutine(coroutineScope: CoroutineScope, observer: Observer<T>)

Observes LiveData using an Observer on a CoroutineScope

Parameters

coroutineScope

The CoroutineScope on which to observe.

observer

The Observer to observe the LiveData