public class FlowRowOverflow private constructor(
type: OverflowType,
minLinesToShowCollapse: Int = 0,
minCrossAxisSizeToShowCollapse: Int = 0,
seeMoreGetter: ((state: FlowLayoutOverflowState) -> @Composable () -> Unit)? = null,
collapseGetter: ((state: FlowLayoutOverflowState) -> @Composable () -> Unit)? = null,
) :
FlowLayoutOverflow(
type,
minLinesToShowCollapse,
minCrossAxisSizeToShowCollapse,
seeMoreGetter,
collapseGetter,
)
Members
Companion
public companion object
Properties
Visible
public val Visible: FlowRowOverflow = FlowRowOverflow(OverflowType.Visible)
Display all content, even if there is not enough space in the specified bounds.
Clip
@ExperimentalLayoutApi public val Clip: FlowRowOverflow = FlowRowOverflow(OverflowType.Clip)
Clip the overflowing content to fix its container.
Functions
expandIndicator
public fun expandIndicator(
content: @Composable FlowRowOverflowScope.() -> Unit
): FlowRowOverflow
Registers an "expand indicator" composable for handling overflow in a FlowRow.
This function allows the creation of a custom composable that can be displayed when there are more items in the FlowRow than can be displayed in the available space. The "expandable indicator" composable can be tailored to show a summary, a button, or any other composable element that indicates the presence of additional items.
Parameters
| content | composable that visually indicates more items can be loaded. |
expandOrCollapseIndicator
@Composable
public fun expandOrCollapseIndicator(
expandIndicator: @Composable FlowRowOverflowScope.() -> Unit,
collapseIndicator: @Composable FlowRowOverflowScope.() -> Unit,
minRowsToShowCollapse: Int = 1,
minHeightToShowCollapse: Dp = 0.dp,
): FlowRowOverflow
Registers an "expand or collapse indicator" composable for handling overflow in a FlowRow.
This function is designed to switch between two states: a "Expandable" state when there are more items to show, and a "Collapsable" state when all items are being displayed and can be collapsed.
Prior to layout, the function evaluates both composables indicators to determine their maximum intrinsic size. Depending on the space available and the number of items, either the expandIndicator or the collapseIndicator is rendered.
Parameters
| minRowsToShowCollapse | Specifies the minimum number of rows that should be visible before showing the collapse option. This parameter is useful when the number of rows is too small to be reduced further. |
| minHeightToShowCollapse | Specifies the minimum height at which the collapse option should be displayed. This parameter is useful for preventing the collapse option from appearing when the height is too narrow. |
| expandIndicator | composable that visually indicates more items can be loaded. |
| collapseIndicator | composable that visually indicates less items can be loaded. |