Skip to content

Instantly share code, notes, and snippets.

View austinevick's full-sized avatar
🎯
Focusing

Augustine Victor austinevick

🎯
Focusing
View GitHub Profile
@austinevick
austinevick / FlexRow.kt
Created April 11, 2024 06:18 — forked from vganin/FlexRow.kt
Jetpack Compose simple flex-wrap container
@Composable
fun FlowRow(
horizontalGap: Dp = 0.dp,
verticalGap: Dp = 0.dp,
alignment: Alignment.Horizontal = Alignment.Start,
content: @Composable () -> Unit,
) = Layout(content = content) { measurables, constraints ->
val horizontalGapPx = horizontalGap.toPx().roundToInt()
val verticalGapPx = verticalGap.toPx().roundToInt()