Closed tomcatter closed 2 years ago
Hi Thanks a lot for the issue report!
We will look into this as soon as possible and let you know when it is fixed
Hi, we have tested this flutter sample using the following corresponding C# code snippet but cannot reproduce this bug.
public class ImageTest : UIWidgetsPanel
{
protected override void main()
{
ui_.runApp(new MyApp());
}
protected override void onEnable()
{
AddFont("Material Icons", new List<string> {"MaterialIcons-Regular.ttf"}, new List<int> {0});
}
class MyApp : StatelessWidget
{
public override Widget build(BuildContext context)
{
return new WidgetsApp(
color: Colors.blue,
home: new MyStatefulWidget(),
pageRouteBuilder: (settings, builder) =>
new PageRouteBuilder(
settings: settings,
pageBuilder: (Buildcontext, animation, secondaryAnimation) => builder(context)
)
);
}
}
class MyStatefulWidget : StatefulWidget
{
public override State createState()
{
return new _MyStatefulWidgetState();
}
}
class _MyStatefulWidgetState : TickerProviderStateMixin<MyStatefulWidget>
{
private AnimationController _controller;
private Animation<float> _animation;
public override void initState()
{
base.initState();
_controller = new AnimationController(
duration: new TimeSpan(0, 0, 0, 2),
vsync: this
);
_controller.repeat(reverse: true);
_animation = new CurvedAnimation(
parent: _controller,
curve: Curves.elasticOut
);
}
public override void dispose()
{
_controller.dispose();
base.dispose();
}
public override Widget build(BuildContext context)
{
return new Scaffold(
body: new Center(
child: new RotationTransition(
turns: _animation,
child: new Padding(
padding: EdgeInsets.all(8.0f),
child: new Icon(Icons.arrow_drop_down, color: Colors.blue, size: 100)
)
)
)
);
}
}
}
Could you please give us a complete sample which can reproduce the bug so that we can investigate further? Thanks !
我关闭了Unity Editor后重新打开项目,同样的代码也没有出现这个问题了
初始如图: 动画执行结束后:
原始位置的图还存在,
代码如下: