Skip to content

Instantly share code, notes, and snippets.

@teegarcs
Created December 13, 2023 14:04
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/31b357f067378b2cc0df83a78daaaf81 to your computer and use it in GitHub Desktop.
Save teegarcs/31b357f067378b2cc0df83a78daaaf81 to your computer and use it in GitHub Desktop.
Generic Lazy Item base class.
abstract class GenericLazyItem<Intent : Any> {
open fun itemKey(): Int = hashCode()
open fun sectionMatcher(): Int? = null
@Composable
open fun BuildHeaderItem(
processIntent: (Intent) -> Unit
) {
//by default no header.
}
@Composable
abstract fun BuildItem(
processIntent: (Intent) -> Unit
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment