I want to use Lottie in Jetpack Compose. here is my code
val logoAnimationComposition by rememberLottieComposition(
spec = LottieCompositionSpec.RawRes(
resId = R.raw.twitter_logo_motion
)
)
val logoAnimationProgress by animateLottieCompositionAsState(
composition = logoAnimationComposition,
isPlaying = true
)
LottieAnimation(
modifier = Modifier.size(
size = logoSize
),
composition = logoAnimationComposition,
progress = logoAnimationProgress
)
I need to know when this animation ends.
i can handle it with the duration of animation that I already know from our ui designer but it's not a good way.
and the documentation didn't say any thing about it.
what can I do?
isAtEnd
didn't work for me. So I used progress >= 1.0F instead. – Braunite