CrossfadeSample
@Composable
fun CrossfadeSample() {
Crossfade(targetState = "A") { screen ->
when (screen) {
"A" -> Text("Page A")
"B" -> Text("Page B")
}
}
}Crossfade allows to switch between two layouts with a crossfade animation.
Compose Multiplatform
Ship iOS, desktop, and web apps with Compose
RevenueCat
Add subscriptions to your apps in minutes
@Composable
fun CrossfadeSample() {
Crossfade(targetState = "A") { screen ->
when (screen) {
"A" -> Text("Page A")
"B" -> Text("Page B")
}
}
}Last updated: