Channels

fun Channels(channelsState: ChannelsState, lazyListState: LazyListState, onLastItemReached: () -> Unit, modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(), helperContent: @Composable BoxScope.() -> Unit = {}, loadingMoreContent: @Composable () -> Unit = { DefaultChannelsLoadingMoreIndicator() }, itemContent: @Composable (ItemState) -> Unit, divider: @Composable () -> Unit)

Builds a list of ChannelItem elements, based on channelsState and action handlers that it receives.

Parameters

channelsState

Exposes if we're loading more items, reaches the end of the list and the current list of channels to show.

lazyListState

State of the lazy list that represents the list of channels. Useful for controlling the scroll state.

onLastItemReached

Handler for when the user reaches the end of the list.

modifier

Modifier for styling.

contentPadding

Padding values to be applied to the channel list surrounding the content inside.

helperContent

Composable that represents the helper content. Empty by default, but can be used to implement scroll to top button.

loadingMoreContent

Composable that represents the loading more content, when we're loading the next page.

itemContent

Customizable UI component, that represents each item in the list.

divider

Customizable UI component, that represents item dividers.