https://kotlinlang.org logo
Title
a

Android75

02/18/2023, 10:34 AM
I have this code 2 colorful ball. Ok it works but i’d like move code to another composition function. Row is inside a box.
Row(modifier = Modifier
    .padding(bottom = 125.dp)
    .align(Alignment.BottomCenter)) {
    Box(
        modifier = Modifier
            .size(10.dp)
            .clip(CircleShape)
            .background(Color.Red)
    )
    Spacer8()
    Box(
        modifier = Modifier
            .size(10.dp)
            .clip(CircleShape)
            .background(Color.Green)
    )
}
If i move row in a composable function i can’t resolve align with any import
a

AmrJyniat

02/18/2023, 10:38 AM
`BoxScope.`BallIndicator(modifier: Modifer)
a

Android75

02/18/2023, 10:41 AM
i have to use this composable?
a

AmrJyniat

02/18/2023, 10:44 AM
It's a scope that indicates that this Comp is called from another
Box
Comp.
a

Android75

02/18/2023, 10:47 AM
thanks it works