replaceAt method
Playlist
replaceAt(
- int index,
- PlaylistAudioReplacer replacer, {
- bool keepPlayingPositionIfCurrent = false,
Implementation
Playlist replaceAt(int index, PlaylistAudioReplacer replacer,
{bool keepPlayingPositionIfCurrent = false}) {
if (index < audios.length) {
final oldElement = audios.elementAt(index);
final newElement = replacer(oldElement);
audios[index] = newElement;
super.currentlyOpenedIn.forEach((playerEditor) {
playerEditor.onAudioReplacedAt(index, keepPlayingPositionIfCurrent);
});
}
return this;
}