LiveDataFactory
is LiveData create utils for androidx.ViewModel.
val url = MutableLiveData<String>()
val name = MutableLiveData<String>()
val description = MutableLiveData<String>()
val ok: LiveData<Boolean> = LiveDataFactory.transform(url, name, description) { url, name, description ->
url.isNotEmpty() && name.isNotEmpty() && description.isNotEmpty()
}
// /app/build.gradle
dependencies {
implementation 'io.github.eaglesakura.livedata-factory:livedata-factory:1.0.0'
}