Open sinhpn92 opened 1 month ago
Hello,
I tried to run the lottie file on iOS. It's working with the .json file, but the.lottie file is not. I get the error message about parser:
.json
.lottie
Is there anyone with the same issue here? Does anyone have any suggestions to solve it?
Thank you so much.
class Loading extends StatefulWidget { const Loading({super.key}); final bool repeat; @override State createState() => _LoadingState(); } class _LoadingState extends State with TickerProviderStateMixin { Future<LottieComposition?> customDecoder(List bytes) { return LottieComposition.decodeZip(bytes, filePicker: (files) { return files.firstWhere( (f) => f.name.startsWith(‘animations/‘) && f.name.endsWith(‘.json’)); }); } @override Widget build(BuildContext context) { return Lottie.asset(AssetsConstants.loadingLottie, decoder: customDecoder, frameRate: FrameRate.max, ); } }
Hello,
I tried to run the lottie file on iOS. It's working with the
.json
file, but the.lottie
file is not. I get the error message about parser:Is there anyone with the same issue here? Does anyone have any suggestions to solve it?
Thank you so much.