notificationStream property
Implementation
Stream<SimpleAudioNotificationState> notificationStream = SimpleAudioPlayerApi.notificationStream.map((event) {
if (event == "onPlay") {
return SimpleAudioNotificationState.onPlay;
} else if (event == "onPause") {
return SimpleAudioNotificationState.onPause;
} else if (event == "onSkipToNext") {
return SimpleAudioNotificationState.onSkipToNext;
} else if (event == "onSkipToPrevious") {
return SimpleAudioNotificationState.onSkipToPrevious;
} else if (event == "onStop") {
return SimpleAudioNotificationState.onStop;
} else {
return SimpleAudioNotificationState.onStop;
}
});