Why is it that border
modifier is not applied when used with .apply { }
?
val selected = remember { mutableStateOf(true) }
val selectableModifier = Modifier
.padding(horizontal = 5.dp, vertical = 8.dp)
.apply {
// this changes, but border is not applied
println("$selected changed")
if (selected) {
border(
BorderStroke(1.dp, MaterialTheme.colors.primaryVariant),
RoundedCornerShape(13.dp)
)
}
}