Animation 颤振:显示用户单击的位置

Animation 颤振:显示用户单击的位置,animation,flutter,onclick,gesturedetector,flare,Animation,Flutter,Onclick,Gesturedetector,Flare,是否可以显示用户在屏幕上点击颤振的动画。我想一个小的动画明星出现在屏幕上的用户按下的权利 new Container( alignment: Alignment(0.0, -1.0), child: new Container( height: 410.0, child: FlareActor( "assets/images/nyastar.flr", animation: _animat

是否可以显示用户在屏幕上点击颤振的动画。我想一个小的动画明星出现在屏幕上的用户按下的权利

 new Container(
  alignment: Alignment(0.0, -1.0),

    child: new Container(
     height: 410.0,

            child: FlareActor(
              "assets/images/nyastar.flr",

             animation: _animationName,
            )
    )
      ),
我有一个动画,暂时只是循环,但我只希望它在用户按下屏幕时循环

 new Container(
  alignment: Alignment(0.0, -1.0),

    child: new Container(
     height: 410.0,

            child: FlareActor(
              "assets/images/nyastar.flr",

             animation: _animationName,
            )
    )
      ),
资料来源:

导入“包装:颤振/材料.省道”;
类Demo扩展StatefulWidget{
@凌驾
MyHomePageState createState()=>新建MyHomePageState();
}
类MyHomePageState扩展了状态{
双posx=100.0;
双posy=100.0;
void onTapDown(BuildContext上下文,tappdownDetails){
final RenderBox=context.findenderObject();
最终偏移量localOffset=box.globalToLocal(details.globalPosition);
设置状态(){
posx=localOffset.dx;
posy=localOffset.dy;
});
}
@凌驾
小部件构建(构建上下文){
返回新的手势检测器(
onTapDown:(tappdownDetails)=>onTapDown(上下文,细节),
子项:新堆栈(拟合:StackFit.expand,子项:[
//扩展堆栈以填充所有空间。必须有更好的
//做这件事的方法。
新容器(颜色:颜色。白色),
新定位(
child:Text('hello'),//要显示的小部件
左:posx,
上图:波西,
)
]),
);
}
}

谢谢,但是当有人在屏幕上拖动手指时,我该如何让它工作(无论他们触摸到哪里,它都应该启动一个新的动画,这样它就可以留下痕迹)?只在屏幕的上半部分工作,这样我还可以按其他按钮?