Last active
July 29, 2023 00:55
-
-
Save phatnhse/cdba509ef6b409587b7f84ff7605b0bf to your computer and use it in GitHub Desktop.
jc-sample-custom-row
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 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