Skip to content

Instantly share code, notes, and snippets.

@sebaslogen
Last active August 9, 2019 13:58
Show Gist options
  • Save sebaslogen/aacce6878988c4ef89efae1cd30b5456 to your computer and use it in GitHub Desktop.
Save sebaslogen/aacce6878988c4ef89efae1cd30b5456 to your computer and use it in GitHub Desktop.
Server Driven UI post: Kotlin data classes
data class ComponentScreen(val title: String?, val sections: List<Section> = emptyList())
sealed class Section
data class AlbumListSection(val title: String?, val items: List<AlbumListItem>) : Section()
data class ShelfSection(val shelfStyle: ShelfItemStyle, val items: List<ShelfItem>) : Section()
data class TrackListSection(val items: List<TrackListItem>) : Section()
data class AlbumListItem(val title: String, val image: String, val action: Action)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment