Created
March 31, 2026 00:59
-
-
Save skydoves/0fa4549b85efa1aec7531c4a603b7914 to your computer and use it in GitHub Desktop.
Compose HotSwan - Adding new composable functions
This file contains hidden or 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 ProfileCard(user: User) { | |
| Column { | |
| UserAvatar(user) // New composable, defined below | |
| Text(text = user.name) | |
| } | |
| } | |
| @Composable | |
| fun UserAvatar(user: User) { | |
| Image( | |
| painter = painterResource(id = R.drawable.avatar), | |
| contentDescription = null, | |
| modifier = Modifier.size(48.dp) | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment