Created
January 20, 2021 17:22
-
-
Save qwert2603/2c75ce979e4be530fb29ca3caeb20753 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
class SomeViewModel : BaseViewModel() { | |
val flow = createViewModelStateFlow(0) | |
suspend fun load() { | |
flow.setValue(1) | |
delay(1000) | |
flow.setValue(flow.value + 1) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment