Why flutter GestureDetector
doesn't make the tap (or click) sound like on the IconButton
widget? Is there any way to implement that?
CodePudding user response:
IconBotton has itself an onTap callback you can use that instead of a gesture detector.
CodePudding user response:
Try Feedback.forTap(context)
. It provides platform-specific feedback like click sound or vibration. Add to the inside onTap
callback of GestureDetector