Future<void> destroyMediaPlayer(int index) async { if (_mediaPlayers[index] == null) { return; } _mediaPlayers[index].instance.destroy(); _mediaPlayers.remove(index); }