New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The lottie files downloaded from lottiefiles can not render #342
Comments
A similar problem occurs when using Lottie.asset. The animation I'm using: https://lottie.host/34058a8b-b777-412c-9dd2-dcd31d035e2b/Dt6WZU5Wu7.json The lottie version: |
Same issue. My Flutter version is 3.19.5, Expected: https://lottiefiles.com/animations/restaurant-website-pre-loader-YposeqGL8Q |
me too! lottie: ^3.1.0 Flutter 3.19.5 • channel stable • https://github.com/flutter/flutter.git |
Can anyone provide a reproducible example?
I've tried the example from here #342 (comment) on 5 differents phones and various flutter version but it doesn't reproduce. So there is something I'm missing. |
import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';
class CustomCircularProgressIndicator extends StatelessWidget {
final Color? color;
const CustomCircularProgressIndicator({this.color, Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Center(
child: Lottie.asset(
"assets/jsons/loading_animation2.json",
height: 100,
width: 100,
),
);
}
}
Phones:
|
@Abdo-Nabil thanks. Can you put the .json link or directly the json content here. That lottiefiles link doesn't work for me. |
@Abdo-Nabil your animation indeed renders incorrectly compared to the web version. |
@xvrh Thanks for your interest, so the problem in some of the animations that are not fully supported by the package....right? |
@Abdo-Nabil in your case, yes. This Flutter library but also the Android and iOS library. |
My case looks like not, the json without color modification works normal, but changed color abnormal |
JSON code in default animation and JSON code in animation with changed color or other parameters are very different. It is quite possible that during editing functions that are not supported by the package are added to the code. |
I have the exact same issue, any updates? |
@mendoxe May be you need to select another animation |
I have tried 6 files and 2 dotfiles, all of them have the same problem (they look distorted). No settings applied
Lottie: 3.1.0 flutter doctor |
Is work underway to address this issue? |
Guys, I've just found a temporary workaround for the issue, the issue basically arises whenever you're using a custom-colored JSON file. Instead, download the original file, and manually edit the JSON file to change the color. How to edit: In a lottie file this is how color is structured:
The above steps actually worked for me, thanks to gpt for breaking the json down. |
Same issue! |
Why??
The text was updated successfully, but these errors were encountered: