Does anyone have a good way to create a vertical d...
# compose
a
Does anyone have a good way to create a vertical divider ? I have
Copy code
Box(
        modifier = Modifier
            .width(1.dp)
            .fillMaxHeight()
            .background(ScoutTheme.colors.dividerColor.copy(alpha = 0.12f))
    )
but I am seeing that when it's used inside a Row who's height is dynamic, nothing ever renders. If I replace the fillMaxHeight with a specific height I see it render but then I have the potential to get empty spaces since the height is specific rather than being dynamic
t
you can do this
Copy code
Row(Modifier.height(IntrinsicSize.Min) { 
Box(
        modifier = Modifier
            .width(1.dp)
            .fillMaxHeight()
            .background(ScoutTheme.colors.dividerColor.copy(alpha = 0.12f))
    )
// other contents
}
a
This is exactly the example in the doc.
a
ohh thanks for pointing that out @Albert Chang I must have just overlooked the sample 😅
m
U need add height of parent as intrinsic. Min