-
-
Save andreymusth/960292064703bddaa3301b4f87502157 to your computer and use it in GitHub Desktop.
animate color as state
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val color by animateColorAsState( | |
targetValue = if (isSelected) { | |
Color.White | |
} else { | |
Color.Black | |
}, | |
animationSpec = tween(durationMillis = 100, easing = LinearEasing) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment