My LottieAnimation is not showing inside of a jetpack compose @Preview fun. It works fine when running on an actual device.
@Preview
@Composable
fun LottiePreview() {
MaterialTheme {
Surface {
Column {
Text(text = "Above lottie")
val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.no_receipts))
LottieAnimation(
composition = composition,
)
Text(text = "Below lottie")
}
}
}
}
I've tinkered with different settings and constructors but haven't been able to get the preview to work - I also have been unable to find any documentation or open issues on this. Am I just missing something obvious to get lotties working in previews?
