Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
S_A_SealedClasses.kt
sealed class UIState
object LoadingState : UIState() // Data is being loaded
class DataState(val data: Data) : UIState() // Data loaded successfully
class ErrorState(val error: Throwable) : UIState() // In case of failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment