您可以使用
bool _condition = true;//...GestureDetector( onTap: _condition ? () { // making it false when onTap() is pressed and after 1 second we'll make it true setState(() => _condition = false); Timer(Duration(seconds: 1), () => setState(() => _condition = true)); // your implementation } : null, // disable onTap if condition is false child: Icon(Icons.content_copy,),),


