playSound static method
Implementation
static playSound(String path) {
final player = AudioPlayer();
player
.setAsset(path)
.then((_) => player.play().then((_) => player.dispose()));
}
static playSound(String path) {
final player = AudioPlayer();
player
.setAsset(path)
.then((_) => player.play().then((_) => player.dispose()));
}