Skip to content

Instantly share code, notes, and snippets.

@teegarcs
Created December 13, 2023 14:05
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 teegarcs/ddb5cc3c37f6004e69e4070eb2746929 to your computer and use it in GitHub Desktop.
Save teegarcs/ddb5cc3c37f6004e69e4070eb2746929 to your computer and use it in GitHub Desktop.
Example use of base class GenericLazyItem
data class TextImageLeft(
private val imageUrl: String,
private val title: String,
private val description: String,
private val groupTitle: String
) : GenericLazyItem<ItemIntent>() {
override fun sectionMatcher() = groupTitle.hashCode()
@Composable
override fun BuildHeaderItem(processIntent: (ItemIntent) -> Unit) {
// Header UI
}
@Composable
override fun BuildItem(processIntent: (ItemIntent) -> Unit) {
//Item UI
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment