Skip to content

Instantly share code, notes, and snippets.

@motorro
Created July 31, 2022 15:45
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 motorro/9f7d0d023cffbc1a5a435fed98345d66 to your computer and use it in GitHub Desktop.
Save motorro/9f7d0d023cffbc1a5a435fed98345d66 to your computer and use it in GitHub Desktop.
LCE app ui-states
sealed class LceUiState {
/**
* Item list view
*/
@Immutable
data class ItemList(val items: List<ItemModel>) : LceUiState()
/**
* Loading spinner
*/
object Loading : LceUiState()
/**
* Item detail view
*/
data class Item(val contents: String) : LceUiState()
/**
* Error view
*/
data class Error(val error: Throwable) : LceUiState()
/**
* Terminator
*/
object Terminated : LceUiState()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment