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

[Feature] Allow specifying the alarm volume using steps/stops #282

Open orkun1675 opened 1 week ago

orkun1675 commented 1 week ago

(updated version of https://github.com/gdelataillade/alarm/pull/276)

This PR allows alarm users to speicfy a staircase function to control the alarm volume.

It also fixes https://github.com/gdelataillade/alarm/issues/267 by adding this line. For some reason AVAudioPlayer ignores volume changes unless the initial volume is set to zero.

PS: Overall, AVAudioPlayer has been a pain to deal with, setVolume has bugs, and it also doesn't report the real .volume value while a fade is in progress.

I've also taken the liberty to fix lint warnings in both iOS and Android native code.

I've tested using iOS and Android emulators + iOS physical device. I would appreciate if you could test this as well before merging. Thanks!

gdelataillade commented 1 week ago

Hi @orkun1675

Thanks for the PR ! Sure, I will test this on my devices. Are we doing the pigeon migration in this PR ?

orkun1675 commented 4 days ago

This PR is a clone of the previous one (when I moved my changes from main to a new branch GitHub closed to previous PR).

PS: Today I started the Pigeon migration, Dart + Kotlin refactorings are complete, Swift is pending.