Created
September 26, 2022 12:01
-
-
Save droid-it/8de341458da5518db1c50da56d4da71e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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