我使用动画控制器在Flutter中创建了一个交错动画来运行给定的小部件。属性(缩放、旋转)在每个间隔都完美地呈现动画。
\n但是当我去添加翻译属性时,它会抛出“未实现的错误”。
\n我已经用不同的值等进行了重新设计,但无法让它工作。
\n我什至尝试单独运行 .translate 属性,但仍然失败。
\n有谁知道我做错了什么?
\n谢谢!
\nclass _AnimatedFlyInShakeState extends State<AnimatedFlyInShake>\n with SingleTickerProviderStateMixin {\n late AnimationController _controller;\n late Animation<double> _rotate, _scale, _scale2;\n late Animation<Offset> _move;\n\n @override\n void initState() {\n _controller = AnimationController(\n duration: Duration(milliseconds: 700),\n vsync: this,\n );\n\n _rotate = Tween<double>(begin: 0.20, end: 1.0).animate(CurvedAnimation(\n parent: _controller,\n curve: Interval(0.0, 0.70, curve: Curves.easeInOut)));\n\n _scale = Tween<double>(begin: 0.0, end: 1.0).animate(CurvedAnimation(\n parent: _controller,\n curve: Interval(0.0, 0.60, curve: Curves.elasticInOut)));\n\n _scale2 = Tween<double>(begin: 1.0, end: …Run Code Online (Sandbox Code Playgroud) 当我尝试将相同的值保存在(多个)不同的框中时,我遇到了问题。
这是配置单元的输出:
[VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: HiveError: The same instance of
an HiveObject cannot be stored in two different boxes.
Run Code Online (Sandbox Code Playgroud)
我真的很感激,如果有人能告诉我,如何将同一个对象保存在多个框中(默认情况下这样做)?