BlackHole
BlackHole copied to clipboard
Play next song on hover feature on audioplayer screen
I have added a feature on audioplayer.dart
screen.
When you hover on your smartphone song changes to next
https://user-images.githubusercontent.com/45431705/158399322-387056a5-afe7-4943-9d77-21dd92aa8bc0.mp4
.
Looks good
Nice feature! Also be sure to provide a switch in the settings page if user wants to disable/enable it
Nice feature! Also be sure to provide a switch in the settings page if user wants to disable/enable it
That's a good point
Ok, it looks good. But a few things that needs to be changed. First of all don't use setstate
. I believe the song can just directly be changed using a listener which calls audioHandler.skipNext()
whenever user hovers. Secondly, as @BrightDV mentioned, an option for the same in settings should be provided. Finally, a request from my side, you can track the duration of hover so that the song pauses or plays when its hovered for more than 3 or 5 seconds. And to change song when hover is less than that interval. Also, I'm not sure about that but can you even track the direction of hover? I don't think proximity sensor provides that, but if it does then you can use that to change track to next or previous one.