Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A state object implemented with Kotlin's sealed classes
sealed class TabbedListState
class InProgressState : TabbedListState()
class FinishedState : TabbedListState()
data class ErrorState(val errorMessage: String,
val errorColor: Int) : TabbedListState()
data class ListState(val listElements: List<Element>,
val totalItems: Int,
val currentTabId: Int,
val tabs: List<TabElement>) : TabbedListState()
data class OfflineState(val listElements: List<Element>) : TabbedListState()
class Element
class TabElement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.