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