flutter 事件组件GestureDetector
用来给组件绑定事件
GestureDetector(
child:组件,
...事件
onVerticalDragDown: (text){} 当点击时会触发,参数为点击坐标
onVerticalDragEnd: (text){} 当松开鼠标时触发,参数为坐标
代码示例:
GestureDetector(
child:Padding(
padding: EdgeInsets.only(right: 10),
child:Icon(Icons.add_circle_outline) ,
),
onTap: (){ },
)
还没有评论,来说两句吧...