SequenceState class Null safety

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(List<IndexedAudioSource> sequence, int currentIndex, List<int> shuffleIndices, bool shuffleModeEnabled, LoopMode loopMode)

Properties

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

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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