Skip to content

Instantly share code, notes, and snippets.

@raulh82vlc
Last active February 28, 2021 12:02
Show Gist options
  • Save raulh82vlc/d97b58f6b01a8e383db1911aa59f9b0d to your computer and use it in GitHub Desktop.
Save raulh82vlc/d97b58f6b01a8e383db1911aa59f9b0d to your computer and use it in GitHub Desktop.
/**
* Output UI States defined for StateFlow & Compose in the workflow
*/
sealed class TweetsUIState {
data class ListResultsUIState(val tweets: List<Tweet>): TweetsUIState()
data class ErrorUIState(val msg: String): TweetsUIState()
data class EmptyUIState(val query: String): TweetsUIState()
object InitialIdleUIState: TweetsUIState()
object LoadingUIState: TweetsUIState()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment