Skip to content

Instantly share code, notes, and snippets.

@phatnhse
Last active July 29, 2023 00:55
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 phatnhse/cdba509ef6b409587b7f84ff7605b0bf to your computer and use it in GitHub Desktop.
Save phatnhse/cdba509ef6b409587b7f84ff7605b0bf to your computer and use it in GitHub Desktop.
jc-sample-custom-row
@Composable
fun MyRow(content: @Composable () -> Unit) {
content()
}
@Composable
fun Sample() {
var button1 by remember { mutableStateOf("button 1") }
Column(horizontalAlignment = Alignment.CenterHorizontally) {
// other composables
MyRow {
Text(text = button1)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment