Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 573 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 573 Bytes

What is this Library?

LiveDataFactory is LiveData create utils for androidx.ViewModel.

Example.

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()
}

How to Install.

// /app/build.gradle
dependencies {
    implementation 'io.github.eaglesakura.livedata-factory:livedata-factory:1.0.0'
}