Forráskód Böngészése

撤销:imageButton防双击添加

xiaohui 2 hete
szülő
commit
de291e7abe
1 módosított fájl, 1 hozzáadás és 8 törlés
  1. 1 8
      lib/components/imageButton.dart

+ 1 - 8
lib/components/imageButton.dart

@@ -1,5 +1,4 @@
 
-import 'package:faqim_mobile/components/clickUtil.dart';
 import 'package:flutter/material.dart';
 
 
@@ -30,13 +29,7 @@ class ImageButton extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return GestureDetector(
-      onTap: () {
-        // 防止快速连击重复触发。
-        if (ClickUtil.isFastClick()) {
-          return;
-        }
-        onTap?.call();
-      },
+      onTap: onTap,
       child: Opacity(
         opacity: onTap == null ? 0.5 : 1.0,
         child: Container(