toggleMute method

void toggleMute()

Implementation

void toggleMute() {
  final currentVolume = _playerState?.currentVolume ?? 1.0;
  setVolume(currentVolume > 0 ? 0.0 : 1.0);
}