effectiveIndices property Null safety

List<int>? effectiveIndices

Returns shuffleIndices if shuffleModeEnabled is true, otherwise returns the unshuffled indices. When no current audio source is set, this returns null.

Implementation

List<int>? get effectiveIndices {
  if (shuffleIndices == null || sequence == null) return null;
  return shuffleModeEnabled
      ? shuffleIndices
      : List.generate(sequence!.length, (i) => i);
}