I want to observe livedata with
viewlifecycleowner
instead of
this
but it is not resolved. What is the dependency for it?
I want to observe livedata with
viewlifecycleowner
instead of
this
but it is not resolved. What is the dependency for it?
https://developer.android.com/jetpack/androidx/releases/lifecycle
// LiveData
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
// Lifecycles only (without ViewModel or LiveData)
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"