Created
April 11, 2019 13:54
-
-
Save vodamiro/5631f9e07faf8631347b15c4e1cfb855 to your computer and use it in GitHub Desktop.
S_A_SealedClasses.kt
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 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