Skip to content

Instantly share code, notes, and snippets.

@marcinOz
Last active June 14, 2018 12:42
Show Gist options
  • Save marcinOz/be275a36c605955de909179aaecfd2c5 to your computer and use it in GitHub Desktop.
Save marcinOz/be275a36c605955de909179aaecfd2c5 to your computer and use it in GitHub Desktop.
sealed class ResourceState<T>
class LoadingState<T> : ResourceState<T>()
class EmptyState<T> : ResourceState<T>()
data class PopulatedState<T>(val data: T) : ResourceState<T>()
data class ErrorState<T>(val message: String?) : ResourceState<T>()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment