I am trying to do a custom action for the next and previous clicks in my headset. The way to do it is by using the click() based on the documentation. I used it and it is working perfectly for Android, but iOS it is not getting triggered at all. Everything else is working.
That's the click code:
Future<void> click([MediaButton button = MediaButton.media]) async {
switch (button) {
case MediaButton.media:
if (playbackState.valueOrNull?.playing == true) {
await pause();
} else {
await play();
}
break;
case MediaButton.next:
await fastForward();
break;
case MediaButton.previous:
await rewind();
break;
}
}
Yet, when I click on next or previous in my headset it goes to next/previous item in the queue instead of rewinding/fastforwarding