Type Crossfade
inline fun <T : Any> TypeCrossfade(state: T, modifier: Modifier = Modifier, fill: Boolean = true, alignment: Alignment = Alignment.Center, animationSpec: FiniteAnimationSpec<Float> = tween(), crossinline content: @Composable T.() -> Unit)
TypeCrossfade is a Crossfade variation that runs a fade-through animation when the type of the state changes. It will not run the animation when the object itself changes.
This should be used for any page where multiple states are defined to transition between them. This can have a small performance impact though, so avoid using this where the type changes very frequently.