Adds the toggle() method for the flashlight plugin