我如何使用sound_generator插件进行颤动
我尝试过,
OutlinedButton(
onPressed: () => {
SoundGenerator.setFrequency(6000),
SoundGenerator.setVolume(1),
SoundGenerator.play(),
})
但这没有播放声音。我在互联网上搜索,但找不到任何来源 这是插件=&gt的官方网站; https://pub.dev/packages/sound_generator
I tried it
OutlinedButton(
onPressed: () => {
SoundGenerator.setFrequency(6000),
SoundGenerator.setVolume(1),
SoundGenerator.play(),
})
But this didn't play the sound. I search on internet but I can't find any source
This is the official web site for plugin => https://pub.dev/packages/sound_generator
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在Initstate()中启动它:
You need to init it in initState() like: