destroyMediaPlayer method

Future<void> destroyMediaPlayer(
  1. int index
)

Implementation

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