禁用水龙头上的FlatButton声音(颤振) [英] Disable FlatButton sound on tap (Flutter)

查看:38
本文介绍了禁用水龙头上的FlatButton声音(颤振)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个可以在您按下FlatButtons时播放声音的应用,而我想禁用每次触摸屏幕时都会播放的预定的流行声音.

Im making an app that play sounds when you press FlatButtons, and I want to disable the predetermined pop sound that plays every time you touch the screen.

有没有办法做到这一点?

Is there a way to do this?

推荐答案

您不能禁用 flatbutton 的声音.您可以使用 InkWell()小部件,它为您提供方法 enableFeedback .您可以将其设置为false并且应该没问题

you cant disable the sound for the flatbutton .you can use InkWell() Widget it offers you the methode enableFeedback . you can set it as false and you should be alright

这篇关于禁用水龙头上的FlatButton声音(颤振)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆