CalculateAvailableItemCount

fun CalculateAvailableItemCount(itemSize: Dp, itemPadding: Dp, direction: DpQualifier = DpQualifier.HEIGHT, modifier: Modifier = Modifier, onResult: (count: Int) -> Unit)

EN Calculates the maximum number of items that can fit in a Composable container.

PT Calcula o número máximo de itens que cabem em um contêiner Composável.

Parameters

itemSize

The size (width or height) of an item.

itemPadding

The total padding (in Dp) around each item (e.g., if there is 2dp on the sides, the padding is 4dp).

direction

The container dimension to be used for the calculation.

onResult

Callback that returns the calculated item count.