Flutter 颤振:;为什么';t`Matrix4.旋转Y`沿Y轴旋转?
以前版本的颤振是沿着Y轴的中间旋转的,但现在它是沿着左侧旋转的,我想知道如何实现中间旋转 颤振版本:2.0.5Flutter 颤振:;为什么';t`Matrix4.旋转Y`沿Y轴旋转?,flutter,Flutter,以前版本的颤振是沿着Y轴的中间旋转的,但现在它是沿着左侧旋转的,我想知道如何实现中间旋转 颤振版本:2.0.5 _rotateController=AnimationController(持续时间:持续时间(毫秒:300),vsync:this); _rotateAnimation=Tween(开始:0.0,结束:1.0)。设置动画(\u animationController) 转化( 变换:矩阵4.rotationY(_rotateAnimation.value*2*pi), 孩子:Ink
_rotateController=AnimationController(持续时间:持续时间(毫秒:300),vsync:this);
_rotateAnimation=Tween(开始:0.0,结束:1.0)。设置动画(\u animationController)
转化(
变换:矩阵4.rotationY(_rotateAnimation.value*2*pi),
孩子:InkWell(
onTap:(){
_rotateAnimation.value==0
?_rotateController.forward()
:_rotateController.reverse();
},
子:容器(
装饰:盒子装饰(
颜色:Colors.green,borderRadius:borderRadius.circular(30)),
宽度:50,
身高:100,
子:文本('aaa${u rotateAnimation.value}'),
)
),
),
答案是:
alignment: Alignment.center,
像这样:
变换(
变换:矩阵4.rotationY(_rotateAnimation.value*2*pi),
对齐:对齐.center,
孩子:。。。