add method

int add(
  1. AudioSource source
)

Adds a source to the playlist

Returns the index of the added source

Implementation

int add(AudioSource source) {
  final newSources = List<AudioSource>.from(_sources)..add(source);
  _updateSources(newSources);
  return newSources.length - 1;
}