Flare-flutter: Flare files randomly lose SVG elements

Created on 7 Mar 2019  Â·  14Comments  Â·  Source: 2d-inc/Flare-Flutter

We created Flare files from 2Dimensions Flare tool by first importing SVG files and then exporting as .flr file.
Files are loaded using the FlareActor from Flare-Flutter package in our app.

The issue that we are seeing is that although the files work as expected in first load, on subsequent loading of the same file they randomly lose some of the elements of the SVG file.
No exceptions/warnings are thrown that we can use to debug this issue.

working

not-working

Flare Flutter version:
^1.2.3
Flutter version:
Flutter 1.2.1 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 8661d8aecd (3 weeks ago) • 2019-02-14 19:19:53 -0800
Engine • revision 3757390fa4
Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

All 14 comments

Thanks for reporting this, I think #51 is related.

Do you have any example code exhibiting the behavior? In the meantime I'll do some test by manually reloading the file via a button to see if I can repro the issue.

I just pushed package 1.3.1 with a fix, let me know if this solves the issue for you!

would you kindly send me the .flr file that you exported? even after upgrading I can't seem to make it work.

I feel like it is not from the flutter_flare package. I think it is from the exporting of the file itself from the 2dimensions flare website.

The file seems to be fine, the issue was that in some cases the animation from a previously loaded file would be used on the newly loaded file and things wouldn't necessarily align. After changing the package did you call flutter pub get?

Thank you @luigi-rosso for such a quick turn-around. Looks like flare_flutter: ^1.3.2 has resolved the issue as the images are no longer breaking. Appreciate it!

Looks like the issue hasn't resolved yet as we came across the issue again!

Shoot! Is it the same workflow? After a second load the image is corrupt, or is the flow different in any way?

yep, just navigating across different tab views and coming back to the initial image is crashing the image elements.

Hey @psovit could you share the Flare file that's affected?

Hi @umberto-sonnino , the comment section of github issues didn't allow me to upload the Flare files (extension not supported here) so I have created a different repo. It has the files that you are looking for.
https://github.com/psovit/flare_issue_samples

I've tried setting up something similar to what you mentioned: a TabBar with 3 different views, each with one of the files you shared. Everything seems to be working fine over here, though: all the elements retain their drawables.
Could you share any other detail on your setup?

Also - just to make sure - have you tried running flutter clean and flutter packages get on the app you're trying to build, and running it again?

I am not sure when exactly the issue happens as it happens very randomly. I tried to recreate the issue on a separate project but the issue isn't appearing. Maybe flutter clean and flutter packages get was what was needed. But I am not sure at this point.

Also, we have cut down on the usage of Flare files. Initially, we had every SVG files (from icons to artworks) exported as Flare files. Now, we have replaced Flare files with PNGs for icons and only few artworks are still used as Flares.

I guess I will re-open the issue when I can reproduce it.

Thanks!

Yes, we're keeping an eye out for this as well, thanks a lot for the reports!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lukepighetti picture lukepighetti  Â·  5Comments

jaumard picture jaumard  Â·  6Comments

MrSagarShah picture MrSagarShah  Â·  3Comments

rohan20 picture rohan20  Â·  6Comments

EArminjon picture EArminjon  Â·  7Comments