Here is my code;
Box(
modifier = Modifier.fillMaxSize(),
contentAlignment = Alignment.Center
){
Canvas(
modifier = Modifier
.fillMaxSize(0.5f)
.border(1.dp, Color.Red)
){
drawRect(
color =Color.Black,
size = size,
style = Stroke(
width = 100f
)
)
}
}
}
Result;
I want the thickness to increase from the inside or outside of the red line, NOT both side. How can i achieve this?




