Created
November 15, 2020 03:28
-
-
Save AmaldevTA/a8ec4815882ae981591ad2ea5dfd09fd to your computer and use it in GitHub Desktop.
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
//implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0' | |
val plants: LiveData<String> = liveData { | |
emit("Mango tree") | |
delay(500) | |
emit("JackFruit tree") | |
} | |
val fruits: Flow<String> = flow { | |
emit("Apple") | |
delay(500) | |
emit("JackFruit") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment