addAll method

int addAll(
  1. List<AudioSource> sources
)

Adds multiple sources to the playlist

Returns the index of the first added source

Implementation

int addAll(List<AudioSource> sources) {
  if (sources.isEmpty) {
    return -1;
  }

  final startIndex = _sources.length;
  final newSources = List<AudioSource>.from(_sources)..addAll(sources);
  _updateSources(newSources);
  return startIndex;
}