gdelataillade / alarm

A Flutter plugin to easily manage alarms on iOS and Android
https://pub.dev/packages/alarm
MIT License
132 stars 86 forks source link

Can I disable audio when alarm triggered? #205

Open devnta opened 5 months ago

devnta commented 5 months ago

As title, in my case I don't want to play audio when the alarm triggered. Can I do it? Thanks. p/s: Sorry for my bad English @gdelataillade

gdelataillade commented 5 months ago

Hi @phamquoctrongnta

No problem I guess you can just pass a silent audio as assetAudioPath. You can download this one here: https://github.com/gdelataillade/alarm/blob/main/assets/blank.mp3

Another option is to pass any other audio (it's better if it's short so it's faster to load) and set the volume parameter to 0.0.

Let me know if it works for you.