Skip to content

Instantly share code, notes, and snippets.

@rmyhal
Last active February 18, 2024 07:02
Show Gist options
  • Save rmyhal/8ac3a13cc513ca40f9710558243747cc to your computer and use it in GitHub Desktop.
Save rmyhal/8ac3a13cc513ca40f9710558243747cc to your computer and use it in GitHub Desktop.
Box(
modifier = Modifier
.fillMaxSize()
) {
var containerState by remember { mutableStateOf(ContainerState.Fab) }
HotTakesContent()
when (containerState) {
ContainerState.Fab -> Fab(
modifier = Modifier
.align(Aligment.BottomEnd)
.padding(end = 16.dp, bottom = 16.dp),
onClick = { containerState = ContainerState.Fullscreen }
)
ContainerState.Fullscreen -> AddContentScreen(
onBack = { containerState = ContainerState.Fab }
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment