Skip to content

Instantly share code, notes, and snippets.

@DjangoLC
Created September 25, 2020 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DjangoLC/ca03e69af7edfce6abfb95ee2c28e73f to your computer and use it in GitHub Desktop.
Save DjangoLC/ca03e69af7edfce6abfb95ee2c28e73f to your computer and use it in GitHub Desktop.
BseUiModel
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