2d-inc / Flare-Flutter

Load and get full control of your Rive files in a Flutter project using this library.
https://rive.app/
MIT License
2.55k stars 470 forks source link

Flare flutter not rendering properly on android #263

Open Moizsohail opened 4 years ago

Moizsohail commented 4 years ago

Flare flutter is working abnormally however it is working perfectly fine on the rive app. It renders some of the objects and misses out on rendering some assets on random or running some of the animations altogether.

Flare_flutter versions tested on: 1.8.3,2.0.5

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel 
stable, v1.17.5, on Microsoft Windows [Version 10.0.18362.900], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[!] Android Studio (version 3.2)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.46.1)
[!] Connected device

    ! No devices available

This following is the main project which I later broke down it into different files with their own animations in an attempt to fix it. https://rive.app/a/moizsohail/files/flare/onboarding-7

This is the explore animation https://rive.app/a/moizsohail/files/flare/explore-single

Screenshot of explore screen on flare flare

Screenshot of explore screen on flutter WhatsApp Image 2020-07-09 at 11 23 17 AM PS ignore the title text

umberto-sonnino commented 4 years ago

When others have encountered this issue in the past, generally the problem was that different animations need to reset the state of their nodes to the values they need.

For example: if you set the opacity of one node to 0 in your animation, by playing a different one without setting that same node's opacity to 1, will cause the node to be transparent.

Can you try by just adding a few extra keys to do this?

Also, could you share your code? What are the animations that you're running together?

Moizsohail commented 4 years ago
FlareActor("explore.flr",animation:"explore")

I have individually tried to change the value at the start of the animation. However, this still does not fix it. Also in the explore.flr there's only a single animation besides idle. And it is still facing the above attached issue.