Skip to content

Instantly share code, notes, and snippets.

@droid-it
Created September 26, 2022 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save droid-it/8de341458da5518db1c50da56d4da71e to your computer and use it in GitHub Desktop.
Save droid-it/8de341458da5518db1c50da56d4da71e to your computer and use it in GitHub Desktop.
@Composable
fun FlowRowSample() {
val colors = remember {
listOf(Color.Yellow, Color.LightGray, Color.Cyan)
}
Box(modifier = Modifier.padding(4.dp)) {
FlowRow {
for (i in 0..10) {
Box(
modifier = Modifier
.width(100.dp)
.height(60.dp)
.background(colors[i % 3])
) {
Text("Item $i", modifier = Modifier.padding(4.dp))
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment