Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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