Skip to content

Instantly share code, notes, and snippets.

@catalinghita8
Last active August 5, 2021 07:56
Show Gist options
  • Save catalinghita8/3dc6bc7535f592faec77d3e9a82281e7 to your computer and use it in GitHub Desktop.
Save catalinghita8/3dc6bc7535f592faec77d3e9a82281e7 to your computer and use it in GitHub Desktop.
class FoodCategoriesContract {
sealed class Event : ViewEvent {
data class CategorySelection(val categoryName: String) : Event()
}
data class State(val categories: List<FoodItem> = listOf(), val isLoading: Boolean = false) : ViewState
sealed class Effect : ViewSideEffect {
object ToastDataWasLoaded : Effect()
sealed class Navigation : Effect() {
data class ToCategoryDetails(val categoryName: String) : Navigation()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment