Created
September 25, 2020 18:47
-
-
Save DjangoLC/ca03e69af7edfce6abfb95ee2c28e73f to your computer and use it in GitHub Desktop.
BseUiModel
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 BaseUiModel<out T> { | |
object Loading : BaseUiModel<Nothing>() | |
class Success<T>(val data: T) : BaseUiModel<T>() | |
class Error(val error: String) : BaseUiModel<Nothing>() | |
class ErrorEx(val data: Exception) : BaseUiModel<Nothing>() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment