2020-05-01 flutter Flutter解决按钮请求防重复提交 12345678910111213141516var lastPopTime;InkWell( onTap: (){ // 防重复提交 if(lastPopTime == null || DateTime.now().difference(lastPopTime) > Duration(seconds: 2)){ lastPopTime = DateTime.now(); _payOrder(context); }else{ lastPopTime = DateTime.now(); MyUtils.showMessage("请勿重复点击!"); } },) 前一篇 CI 获取数据库数据类型总是为STRING 的解决方案 后一篇 新浪微博PC端模拟登陆