a

    Abhishek Dewan

    1 year ago
    Does anyone have a good way to create a vertical divider ? I have
    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

    Tin Tran

    1 year ago
    you can do this
    Row(Modifier.height(IntrinsicSize.Min) { 
    Box(
            modifier = Modifier
                .width(1.dp)
                .fillMaxHeight()
                .background(ScoutTheme.colors.dividerColor.copy(alpha = 0.12f))
        )
    // other contents
    }
    Albert Chang

    Albert Chang

    1 year ago
    This is exactly the example in the doc.
    a

    Abhishek Dewan

    1 year ago
    ohh thanks for pointing that out @Albert Chang I must have just overlooked the sample 😅
    m

    Mohan

    1 year ago
    U need add height of parent as intrinsic. Min