SequenceState class

Encapsulates the sequence and currentIndex state and ensures consistency such that currentIndex is within the range of sequence.length. If sequence.length is 0, then currentIndex is also 0.

Constructors

SequenceState({required List<IndexedAudioSource> sequence, required int? currentIndex, required List<int> shuffleIndices, required bool shuffleModeEnabled, required LoopMode loopMode})

Properties

currentIndex int?
The index of the current source in the sequence.
no setter
currentSource IndexedAudioSource?
The current source in the sequence.
no setter
effectiveSequence List<IndexedAudioSource>
The effective sequence. This is equivalent to sequence. If shuffleModeEnabled is true, this is modulated by shuffleIndices.
no setter
hashCode int
The hash code for this object.
no setterinherited
loopMode LoopMode
The current loop mode.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sequence List<IndexedAudioSource>
The current sequence of IndexedAudioSources.
final
shuffleIndices List<int>
The current shuffle order
final
shuffleModeEnabled bool
Whether shuffle mode is enabled.
final

Methods

copyWith({List<IndexedAudioSource>? sequence, int? currentIndex = _defaultInt, List<int>? shuffleIndices, bool? shuffleModeEnabled, LoopMode? loopMode}) SequenceState
Returns a copy of this SequenceState with the given properties replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited