move method
(Untested) Moves an AudioSource from currentIndex
to newIndex
.
Implementation
Future<void> move(int currentIndex, int newIndex) async {
children.insert(newIndex, children.removeAt(currentIndex));
_shuffleOrder.removeRange(currentIndex, currentIndex + 1);
_shuffleOrder.insert(newIndex, 1);
if (_player != null) {
_player!._broadcastSequence();
await (await _player!._platform).concatenatingMove(
ConcatenatingMoveRequest(
id: _id,
currentIndex: currentIndex,
newIndex: newIndex,
shuffleOrder: List.of(_shuffleOrder.indices)));
}
}