playAudio method

void playAudio(
  1. String filePath
)

Plays an audio file from the assets directory. Example file path for '/assets/audio/sound.wav'

Implementation

void playAudio(String filePath) {
  if (filePath.isNotEmpty) {
    audioService.playLocalFile(filePath);
  }
}