Created
September 28, 2019 04:39
-
-
Save prokash-sarkar/bb80dfd8d2da97ea999601399e72344c to your computer and use it in GitHub Desktop.
Using LiveDataReactiveStreams to convert Flowable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <T> LiveData<T>.toFlowable(owner: LifecycleOwner): Flowable<T> = | |
Flowable.fromPublisher(LiveDataReactiveStreams.toPublisher(owner, this)) | |
fun <T> Flowable<T>.toLiveData(): LiveData<T> = LiveDataReactiveStreams.fromPublisher(this) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment