Skip to content

Instantly share code, notes, and snippets.

@Starchild13
Created December 30, 2023 21:51
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 Starchild13/2d3ae4b25bc44437163c4310c5ffb899 to your computer and use it in GitHub Desktop.
Save Starchild13/2d3ae4b25bc44437163c4310c5ffb899 to your computer and use it in GitHub Desktop.
Flow Row Example
@OptIn(ExperimentalLayoutApi::class)
@Composable
private fun FlowRowExample() {
// Remember the state of a selected chip.
val textChipRememberOneState = remember { mutableStateOf("") }
// Arrange chips in a horizontal flow with wrapping.
FlowRow(Modifier.padding(8.dp)) {
// Instantiate individual chips.
ChipItem("Team: Arsenal",textChipRememberOneState)
ChipItem("Position: Goal Keeper",textChipRememberOneState)
ChipItem("T-shirt number: 13",textChipRememberOneState)
ChipItem("Players Name: Aaron Ramsdale",textChipRememberOneState)
ChipItem("Your bet that your team wins: $100 ",textChipRememberOneState)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment