Last active
April 26, 2024 02:53
-
-
Save fvilarino/80ae01548cccdb2335019f4dbab0de2b to your computer and use it in GitHub Desktop.
Container Transform - Baseline
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 MorphingFab(modifier: Modifier = Modifier) { | |
val users = remember { mutableStateListOf<User>() } | |
Box(modifier = modifier) { | |
UserList( | |
users = users, | |
modifier = Modifier.fillMaxSize(), | |
) | |
InputBox( | |
onAddUser = { | |
users.add(it) | |
}, | |
onCancel = { /* TODO */ }, | |
modifier = Modifier | |
.align(Alignment.Center) | |
.width(320.dp) | |
.shadow(elevation = 4.dp), | |
) | |
FloatingActionButton( | |
modifier = Modifier | |
.align(Alignment.BottomEnd) | |
.padding(all = 16.dp), | |
onClick = { | |
// TODO | |
} | |
) { | |
Icon( | |
imageVector = Icons.Default.Add, | |
contentDescription = "Add", | |
) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment