toggleSound static method

void toggleSound()

Implementation

static void toggleSound() {
  isSoundOn = !isSoundOn;
  log("Sound toggled. New state: $isSoundOn");
}