Last active
July 25, 2021 12:01
-
-
Save k0siara/1e611f2842c6a0a8f5ce1e79e2d0f8d6 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 ExampleViewModel( | |
private val initialState: ExampleViewState | |
) : ViewModel() { | |
private val _uiState: MutableStateFlow<ExampleViewState> = MutableStateFlow(initialState) | |
val uiState = _uiState.asStateFlow() | |
} | |
data class ExampleViewState( | |
val title: String = "", | |
val description: String = "" | |
// other state variables | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment