DefaultShuffleOrder class
The default implementation of ShuffleOrder which shuffles items with the currently playing item at the head of the order.
- Inheritance
-
- Object
- ShuffleOrder
- DefaultShuffleOrder
Constructors
- DefaultShuffleOrder({Random? random})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
indices
→ List<
int> -
The shuffled list of indices of AudioSources to play. For example,
2,0,1
specifies to play the 3rd, then the 1st, then the 2nd item.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void -
Removes all indices.
override
-
insert(
int index, int count) → void -
Inserts
count
new consecutive indices starting fromindex
into indices, at random positions.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeRange(
int start, int end) → void -
Removes the indices that are
>= start
and< end
.override -
shuffle(
{int? initialIndex}) → void -
Shuffles the indices. If the current item in the player falls within the
ConcatenatingAudioSource being shuffled,
initialIndex
will point to that item. Subclasses may use this information as a hint, for example, to makeinitialIndex
the first item in the shuffle order.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited