-
-
Save uteke/3374e9a15fd25434c86c66cd5ad8c6d2 to your computer and use it in GitHub Desktop.
Sealed view state
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
sealed interface ViewState { | |
data object Loading : ViewState | |
data object Empty : ViewState | |
data class Content( | |
val users: List<UserState>, | |
) : ViewState | |
data class Error( | |
val message: String, | |
) : ViewState | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment