简体   繁体   中英

Flare Flutter animation issue

My original Flare file/animation has a Cubic curve defined for all its animation. But when I export and run the same animation on my Flutter app, it seems to use a Linear curve. I have exported the files multiple times with different changes on it, but no luck.

Flutter code:

Scaffold(
  backgroundColor: Colors.white,
  body: Center(
    child: Container(
      child: FlareActor(
        "assets/flare.flr",
        animation: "animate",
      ),
    ),
  ),
),

Files: https://github.com/2d-inc/Flare-Flutter/files/3266731/flare_files.zip

Link to flare: https://www.2dimensions.com/a/iamyogik/files/flare/new-file-4

Video of the flare animation running in the app: https://drive.google.com/file/d/1B98DNE3Zq26jQs4YCsDx-2gYnNaPIo4J/view?usp=sharing

As you have provided the link in which there is a animation but it is named as "new" (You can see that under the Animations tab in bottom left) but here in the code you have wrote "animate" instead of "new". Try replacing this code

animation : "animate"

with this

animation : "new"

"new" is the name of your animation as i said before, and you have to write name of animation in the "animation" in your code, you can check this article from medium and in case if that doesn't work then please make sure that you are using the same flare file for that animation .

As you specified here there the file name is "New File 4.flr" and animation for that is "new" as you can see in the bottom left.
But In flutter code you are using file name as "flare.flr" and animation for that as "animation" . So please cross check your file name and its animation name.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM