InkWell(
onTap: (){
// 防重复提交
if(lastPopTime == null || DateTime.now().difference(lastPopTime) > Duration(seconds: 2)){
lastPopTime = DateTime.now();
_payOrder(context);
}else{
lastPopTime = DateTime.now();
MyUtils.showMessage("请勿重复点击!");
}
},
)
Flutter解决按钮请求防重复提交
最新推荐文章于 2024-09-02 10:09:32 发布