颤振旋转X Y图像

时间:2020-03-03 17:55:14

标签: flutter dart

我有一个问题,在动画中,图像首先在X轴上旋转,然后在Y轴上旋转,但是图像在旋转之前是颠倒的。如何使图像无法以这种方式可视化?

_controller = (widget.controller ??
    AnimationController(vsync: this, duration: widget.duration))
  ..addListener(() => setState(() {}))
  ..repeat();
_animation1 = Tween(begin: 0.0, end: 180.0).animate(CurvedAnimation(
    parent: _controller,
    curve: const Interval(0.0, 0.5, curve: Curves.easeIn)));
_animation2 = Tween(begin: 0.0, end: 180.0).animate(CurvedAnimation(
    parent: _controller,
    curve: const Interval(0.5, 1.0, curve: Curves.easeInOut)));


transform: Matrix4.identity()
          ..rotateX((0 - _animation1.value) * valorAngulo)
          ..rotateY((0 - _animation2.value) * valorAngulo),

这是我的code

enter image description here

0 个答案:

没有答案