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)
- There is a difference between loading on the app and HTML HOT 2
- Not working in iOS17
- Text Animation Exported with After Effects Body Movin Not Working
- Change Speed Not On Load
- Animation made through Ae 3D space is not supported
- Animation not displayed correctly HOT 8
- ValueDelegate.gradientColor Unable to continuously refresh HOT 4
- ValueDelegate.position can not change all shapes
- The gradient in my animation made with Adobe after effects doesn't work as expected. HOT 2
- add flutter 3.16 proper support and update dependencies HOT 2
- ValueDelegate.position can not change images
- Using this library will use a lot of GPUs, even if `enableRenderCache` has been used HOT 2
- Valid json with missing frames HOT 1
- Black lines appear when one animation overlaps another one
- how to Cache tgs file . HOT 1
- tgs lottie very slow on android HOT 5
- How should I playsegment? HOT 2
- RenderCache as Raster initializes animation with incorrect state HOT 1
- How to disable the implementation of auto-orient?
- Privacy Manifest file for IOS HOT 2
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.