Skip to content

Instantly share code, notes, and snippets.

@DarkAbhi
Last active February 16, 2021 14:42
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 DarkAbhi/e0d3bea89c6ba71a64bfd4fe801138e3 to your computer and use it in GitHub Desktop.
Save DarkAbhi/e0d3bea89c6ba71a64bfd4fe801138e3 to your computer and use it in GitHub Desktop.
sealed class State<out T> {
class Loading<out T> : State<T>()
data class Success<out T>(val data: T) : State<T>()
data class Failed<out T>(val message: String) : State<T>()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment