File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -239,17 +239,15 @@ class SmartAnimatedWidgetState extends State<SmartAnimatedWidget> with SingleTic
239239 skewYTween.evaluate (_animation),
240240 ),
241241 child: Transform (
242- transform: Matrix4 .rotationX (
243- rotateXTween.evaluate (_animation),
244- ),
245- child: Transform (
246- transform: Matrix4 .rotationY (
247- rotateYTween.evaluate (_animation),
248- ),
249- child: Opacity (
250- opacity: opacityTween.evaluate (_animation),
251- child: _child,
252- ),
242+ transform: Matrix4 .identity ()
243+
244+ /// 设置perspective,详情见https://medium.com/flutter/perspective-on-flutter-6f832f4d912e
245+ ..setEntry (3 , 2 , 0.001 )
246+ ..setRotationX (rotateXTween.evaluate (_animation))
247+ ..setRotationY (rotateYTween.evaluate (_animation)),
248+ child: Opacity (
249+ opacity: opacityTween.evaluate (_animation),
250+ child: _child,
253251 ),
254252 ),
255253 ),
You can’t perform that action at this time.
0 commit comments