playSound static method

dynamic playSound(
  1. String path
)

Implementation

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