ContentCardsList

fun ContentCardsList(cards: List<Card>? = null, emptyComposable: () -> Unit? = null, emptyString: String? = null, cardUpdateHandler: (List<Card>) -> List<Card>? = null, onCardClicked: (Card) -> Boolean? = null, onCardDismissed: (Card) -> Unit? = null, customCardComposer: (Card) -> Boolean? = null, style: ContentCardListStyling = LocalContentCardListStyling.current, cardStyle: ContentCardStyling = LocalContentCardStyling.current)

BrazeContentCardsList displays a list of Content Cards.

Parameters

cards

List of Card to render. If null, all content cards will be retrieved and displayed.

emptyComposable

The composable to render if there are no content cards.

emptyString

The string to display when there are no content cards. Will not display if emptyComposable is present.

cardUpdateHandler

The function to filter and sort the list of cards. If null, all cards will be passed with a default sort.

onCardClicked

Will be called when a card is clicked. Returns false if Braze should handle the click.

onCardDismissed

Will be called when a card is dismissed.

customCardComposer

A function that can take a card and then either compose it and return true, or return false and have the card rendered by default. If you use this, you are responsible for handling all aspects of card rendering (unread, pinned, etc.). You also need to handle card clicks (See BrazeContentCardUtils.handleCardClick).