animateVisibility

fun Modifier.animateVisibility(isVisible: Boolean): Modifier

Extension function for Modifier to animate the visibility of a composable.

Return

A Modifier with the alpha value set based on the visibility.

Parameters

isVisible

Boolean value. If true, the composable is fully visible; otherwise, it is fully transparent.