ListCard

fun ListCard(modifier: Modifier = Modifier, listCardState: ListCardState, listAvatar: @Composable () -> Unit? = null, actionButton: @Composable () -> Unit? = null, onCardClick: () -> Unit, onSizeChanged: (IntSize) -> Unit? = null)

DHIS2 ListCard. Component intended for TEI/Event/DataSet card display.

Parameters

modifier

: allows a modifier to be passed externally.

listCardState

: state containing all configurations for the card

listAvatar

: composable element to be used as avatar.

actionButton

: composable parameter for the sync button.

onCardClick

: gives access to click event on the main container.


fun ListCard(listAvatar: @Composable () -> Unit? = null, title: ListCardTitleModel, description: ListCardDescriptionModel? = null, lastUpdated: String? = null, additionalInfoList: List<AdditionalInfoItem>, actionButton: @Composable () -> Unit? = null, expandLabelText: String = provideStringResource("show_more"), shrinkLabelText: String = provideStringResource("show_less"), loading: Boolean = false, onCardClick: () -> Unit, shadow: Boolean = true, modifier: Modifier = Modifier, scrollableContent: Boolean = false, expandable: Boolean = false, itemVerticalPadding: Dp? = null, minItemsToShow: Int = 3, onSizeChanged: (IntSize) -> Unit? = null)

Deprecated

Use rememberListCardState constructor

DHIS2 ListCard. Component intended for TEI/Event/DataSet card display.

Parameters

listAvatar

: composable element to be used as avatar.

title

: is the card title.

description

: the text to be used in description.

lastUpdated

: shows the last time item was synchronized.

additionalInfoList

: is a list of AdditionalInfoItem that manages all the key value types that will be shown if there are more than three items that are not constant a show more/less button will appear and the rest of items will be hidden.

expandLabelText

: the text to be shown for expand button.

shrinkLabelText

: the text to be shown for shrink button.

actionButton

: composable parameter for the sync button.

onCardClick

: gives access to click event on the main container.

loading

: controls visibility of the loading item.

shadow

: whether to show a shadow or not.

modifier

: allows a modifier to be passed externally.