【问题标题】:Flare Flutter animation issueFlare Flutter 动画问题
【发布时间】:2019-10-26 17:32:26
【问题描述】:

我的原始 Flare 文件/动画为其所有动画定义了三次曲线。但是当我在我的 Flutter 应用程序上导出并运行相同的动画时,它似乎使用了线性曲线。我已经多次导出文件并对其进行了不同的更改,但没有运气。

颤振代码:

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

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

耀斑链接:https://www.2dimensions.com/a/iamyogik/files/flare/new-file-4

应用中运行的耀斑动画视频:https://drive.google.com/file/d/1B98DNE3Zq26jQs4YCsDx-2gYnNaPIo4J/view?usp=sharing

【问题讨论】:

  • 尝试缩短动画长度

标签: flutter flutter-animation flare


【解决方案1】:

正如您提供的 link,其中有一个动画,但它被命名为“新”(您可以在左下角的“动画”选项卡下看到它)但在代码中您已经编写了“动画”的“新”。 尝试替换此代码

animation : "animate"

有了这个

animation : "new"

"new"是我之前说的你的动画的名字,你必须在你的代码中的"animation"中写上动画的名字,你可以从中查看article 如果这不起作用,那么请确保您对该动画使用相同的flare文件

正如您指定的 here 文件名是 "New File 4.flr" 和动画是 "new" 如您在底部看到离开了。
但是在颤振代码中,您使用文件名作为 "flare.flr" 和动画作为 "animation"。 所以请交叉检查您的文件名及其动画名称。

【讨论】:

猜你喜欢
  • 2020-01-03
  • 2020-11-15
  • 2020-04-12
  • 2019-07-29
  • 2019-08-13
  • 1970-01-01
  • 2020-04-20
  • 2020-01-02
相关资源
最近更新 更多