Section
data class Section<T>(val state: Section.State<T>, val headerContent: @Composable SectionContentScope.() -> Unit? = null, val headerVisibleStates: Section.VisibleStates = ALL_STATES, val loadingContent: @Composable SectionContentScope.() -> Unit? = null, val loadingContentCount: Int = DEFAULT_LOADING_CONTENT_COUNT, val loadedContent: @Composable SectionContentScope.(T) -> Unit? = null, val failedContent: @Composable SectionContentScope.() -> Unit? = null, val emptyContent: @Composable SectionContentScope.() -> Unit? = null, val footerContent: @Composable SectionContentScope.() -> Unit? = null, val footerVisibleStates: Section.VisibleStates = LOADED_STATE_ONLY)
A section in SectionedList.
Constructors
Link copied to clipboard
constructor(state: Section.State<T>, headerContent: @Composable SectionContentScope.() -> Unit? = null, headerVisibleStates: Section.VisibleStates = ALL_STATES, loadingContent: @Composable SectionContentScope.() -> Unit? = null, loadingContentCount: Int = DEFAULT_LOADING_CONTENT_COUNT, loadedContent: @Composable SectionContentScope.(T) -> Unit? = null, failedContent: @Composable SectionContentScope.() -> Unit? = null, emptyContent: @Composable SectionContentScope.() -> Unit? = null, footerContent: @Composable SectionContentScope.() -> Unit? = null, footerVisibleStates: Section.VisibleStates = LOADED_STATE_ONLY)
Types
Link copied to clipboard
data class VisibleStates(val loading: Boolean, val loaded: Boolean, val failed: Boolean, val empty: Boolean)
Define on which states the section's header or footer should be visible.