@@ -279,7 +279,7 @@ class AudioPlayer {
279
279
.pairwise ()
280
280
.listen ((rec) {
281
281
if (_seeking) return ;
282
- final [(prevEvent, prevSource), (currEvent, currSource)] = rec;
282
+ final [(prevEvent, prevSource), (currEvent, currSource)] = rec. toList () ;
283
283
if (prevSource == null || currSource == null ) return ;
284
284
if (currSource._id != prevSource._id) {
285
285
// If we've changed item without seeking, it must be an autoAdvance.
@@ -447,7 +447,7 @@ class AudioPlayer {
447
447
AudioSource ? get audioSource => _playlist.children.firstOrNull;
448
448
449
449
/// The latest [PlaybackEvent] .
450
- PlaybackEvent get playbackEvent => _playbackEventSubject.value ;
450
+ PlaybackEvent get playbackEvent => _playbackEventSubject.nvalue ! ;
451
451
452
452
/// A stream of [PlaybackEvent] s.
453
453
Stream <PlaybackEvent > get playbackEventStream => _playbackEventSubject.stream;
@@ -520,14 +520,14 @@ class AudioPlayer {
520
520
Stream <PlayerState > get playerStateStream => _playerStateSubject.stream;
521
521
522
522
/// The current sequence of indexed audio sources.
523
- List <IndexedAudioSource > get sequence => _sequenceSubject.value ;
523
+ List <IndexedAudioSource > get sequence => _sequenceSubject.nvalue ! ;
524
524
525
525
/// A stream broadcasting the current sequence of indexed audio sources.
526
526
Stream <List <IndexedAudioSource >> get sequenceStream =>
527
527
_sequenceSubject.stream;
528
528
529
529
/// The current shuffled sequence of indexed audio sources.
530
- List <int > get shuffleIndices => _shuffleIndicesSubject.value ;
530
+ List <int > get shuffleIndices => _shuffleIndicesSubject.nvalue ! ;
531
531
532
532
/// A stream broadcasting the current shuffled sequence of indexed audio
533
533
/// sources.
@@ -541,7 +541,7 @@ class AudioPlayer {
541
541
Stream <int ?> get currentIndexStream => _currentIndexSubject.stream;
542
542
543
543
/// The current [SequenceState] .
544
- SequenceState get sequenceState => _sequenceStateSubject.value ;
544
+ SequenceState get sequenceState => _sequenceStateSubject.nvalue ! ;
545
545
546
546
/// A stream broadcasting the current [SequenceState] .
547
547
Stream <SequenceState > get sequenceStateStream => _sequenceStateSubject.stream;
0 commit comments