Created
June 15, 2022 09:33
-
-
Save EmmanuelGuther/0d7d4b153bb68df6a814d4fe338f9c78 to your computer and use it in GitHub Desktop.
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
@Composable | |
fun AnimatedText(text: String, modifier: Modifier, tween: Int = 1000, color: Color, textStyle: TextStyle) { | |
val textScale by rememberInfiniteTransition().animateFloat( | |
initialValue = 0.9f, targetValue = 1f, animationSpec = infiniteRepeatable( | |
animation = tween(tween), repeatMode = RepeatMode.Reverse | |
) | |
) | |
Text( | |
modifier = modifier.scale(textScale), text = text, color = color, style = textStyle | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment