clear method

Future<void> clear()

(Untested) Removes all AudioSources.

Implementation

Future<void> clear() async {
  final end = children.length;
  children.clear();
  _shuffleOrder.clear();
  if (_player != null) {
    _player!._broadcastSequence();
    await (await _player!._platform).concatenatingRemoveRange(
        ConcatenatingRemoveRangeRequest(
            id: _id,
            startIndex: 0,
            endIndex: end,
            shuffleOrder: List.of(_shuffleOrder.indices)));
  }
}