Comments (7)
Hi,
Thanks for the report.
The problem seems to exist also with the Lottie-android
library (from which this library is a direct port).
This warning is reported after loading the composition:
Lottie doesn't support layer effects. If you are using them for fills, strokes, trim paths etc. then try adding them directly as contents in your shape. Found: [Color 1 , Color 2, Slider Control]
Maybe you could re-export the animation without using layer effects?
Alternatively, you can try to workaround this limitation and apply the color yourself with a ValueDelegate
:
Lottie.asset(
'assets/bike.json',
delegates: LottieDelegates(
values: [
for (var i in ['4', '2'])
ValueDelegate.colorFilter(['Warstwa $i', '**'],
value:
ColorFilter.mode(Color(0xff179977), BlendMode.srcIn)),
],
),
)
from lottie-flutter.
Hi @enricobenedos
I tried a few things and got the same issue.
Seems that the problem it's with the JSON from Lordicon, so I taked some from Icons8, edit one on the Lottie Editor, changed the color of the Layer and worked just fine.
Try it later.
Icons8: https://icons8.com/animated-icons
Lottie Editor: https://lottiefiles.com/editor
from lottie-flutter.
Thank you @xvrh for the fast response. I will try our advice as soon as possible because now I'm a little busy with my app bug fix
from lottie-flutter.
Hey @northonBarbosa thank you for your explanation. I tried to import the issue file on Lottie Editor but seems that there are some issue with colours, even if I try to change them nothing works.
I still have to try with the @xvrh suggested code
from lottie-flutter.
@enricobenedos I got the same issue when I tried to edit the color of the JSON from Lordicon.
I also tried what @xvrh suggested but the color dind't changed.
JSON from Lordicon only show one color layer, try find a similar icon on Icons8 and change the color layer on editor.
from lottie-flutter.
Hey @enricobenedos I edited the colors from the bike icon on Lottie Editor and did worked!
Even with the errors the color change on the JSON file, but the real quest is to know what color layer to change, because with the errors you can't see the colors changing in the Editor.
To get this result I changed the Warstwa 3 (first block), Warstwa 4 and Warstwa 2.
Check it out the result:
from lottie-flutter.
Hey @northonBarbosa thank for your advices. Event if Lottie editor is bugged the JSON is correctly exported, I hope that Lottie team will fix it because the problem is that you need to change colors blindly.
Also thank to @xvrh your solution works perfectly! Also in this case we need to blindly find the correct colors properties.
@xvrh it is a good idea to keep this issue open as long as this problem will be solved on Android?
from lottie-flutter.
Related Issues (20)
- Privacy Manifest file for IOS HOT 2
- Screen Stuck when try to load the lottie in flutter web
- The lottie files downloaded from lottiefiles can not render HOT 34
- lottie.netowkr how to cached?
- can't load json animation HOT 4
- The CPU usage is especially high HOT 2
- Lottie not working in web since 3.1.2 HOT 6
- .lottie file not working on iOS HOT 1
- How can I let the click or slide event penetrate the lottie animation? HOT 2
- Not working on Windows 10
- How to show the last frame?
- Some lottie animations are not rendering correctly in Flutter HOT 3
- Strange lottie animation effect
- Animation flickering when updating to Flutter 3.22.x (iOS) HOT 11
- [Critical] Fatal animation error on LottieFiles website (Flutter)
- Unknown point starts with Token.nullToken HOT 2
- Animation presents different effects on Lottie Flutter and Lottie Android
- Fatal animation error on big LottieFiles.
- Performance and animation problem
- Unable to load Lottie.asset correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lottie-flutter.