Skip to content

Instantly share code, notes, and snippets.

@KatieBarnett
Created August 27, 2023 10:33
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 KatieBarnett/abc812435ba93a9758874f41f4913212 to your computer and use it in GitHub Desktop.
Save KatieBarnett/abc812435ba93a9758874f41f4913212 to your computer and use it in GitHub Desktop.
Conditional disabled modifier
@Composable
fun DisabledScene(
isDisabled: Boolean,
modifier: Modifier = Modifier
) {
Row(
modifier.conditional(isDisabled, {
disabled()
})
) {
SceneContent(color = Color.Blue)
SceneContent(color = Color.Red)
SceneContent(color = Color.Black)
PhotoSceneContent(color = Pink)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment