File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ class SmartAnimatedWidgetState extends State<SmartAnimatedWidget> with SingleTic
228228 scaleYTween.evaluate (_animation),
229229 1.0 ,
230230 ),
231+ alignment: Alignment .center,
231232 child: Transform .translate (
232233 offset: Offset (
233234 translateXTween.evaluate (_animation),
@@ -238,13 +239,15 @@ class SmartAnimatedWidgetState extends State<SmartAnimatedWidget> with SingleTic
238239 skewXTween.evaluate (_animation),
239240 skewYTween.evaluate (_animation),
240241 ),
242+ alignment: Alignment .center,
241243 child: Transform (
242244 transform: Matrix4 .identity ()
243245
244246 /// 设置perspective,详情见https://medium.com/flutter/perspective-on-flutter-6f832f4d912e
245247 ..setEntry (3 , 2 , 0.001 )
246- ..setRotationX (rotateXTween.evaluate (_animation))
247- ..setRotationY (rotateYTween.evaluate (_animation)),
248+ ..rotateY (rotateYTween.evaluate (_animation))
249+ ..rotateX (rotateXTween.evaluate (_animation)),
250+ alignment: Alignment .center,
248251 child: Opacity (
249252 opacity: opacityTween.evaluate (_animation),
250253 child: _child,
You can’t perform that action at this time.
0 commit comments