Birgit L
07/09/2024, 2:20 PMyoussef hachicha
07/09/2024, 8:17 PMval textList = listOf("test", "test")
@Composable
fun TextWithDivider(
text: String,
index: Int,
){
Text(text = text)
if (index != textList.lastIndex)
Divider()
}
FlowRow {
textList.forEachIndexed { index, text ->
TextWithDivider(text,index)
}
}
Stylianos Gakis
07/09/2024, 8:55 PMI want to avoid a divider item being the first or last item in a row.
Read the post again @youssef hachicha , this isn't only for the last item, but also for the first item in a row.