Skip to content

Instantly share code, notes, and snippets.

@LukaKordic
Last active September 3, 2019 09:17
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 LukaKordic/a6b90e3fbc12950c158df4b738d2c7d3 to your computer and use it in GitHub Desktop.
Save LukaKordic/a6b90e3fbc12950c158df4b738d2c7d3 to your computer and use it in GitHub Desktop.
sealed class ViewState<out T : Any>
class Success<out T : Any>(val data: T) : ViewState<T>()
class Error<out T : Any>(val error: Throwable) : ViewState<T>()
class Loading<out T : Any> : ViewState<T>()
class NoInternetState<T : Any> : ViewState<T>()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment