here is the code and I used audio Player plugin
plicqrtu1#
在这里,您应该在函数外部全局定义final player = AudioPlayer();,然后使用它
final player = AudioPlayer();
final player=AudioPlayer(); void playSound(int soundNumber){ player.stop(); player.play(soundExample); }
1条答案
按热度按时间plicqrtu1#
在这里,您应该在函数外部全局定义
final player = AudioPlayer();
,然后使用它