1. A single-stage driver for an LED device, configured to be coupled between a power supply and the LED device, the driver comprising:a rectifier, configured to be coupled to the power supply and convert an alternating voltage from the power supply into a first direct voltage;
a DC-to-DC converter, coupled between the rectifier and the LED device and configured to receive the first direct voltage and provide a constant current to the LED device, the DC-to-DC converter comprising at least two switches, wherein the at least two switches comprises a first switch, a second switch and a third switch, wherein the DC-to-DC converter further comprises an inductor, a first diode, a second diode, a third diode and a first capacitor; the power supply is configured to charge the inductor via the first, second and third switches when the first, second and third switches are on; the inductor is configured to discharge via the first diode, the first capacitor, the third diode and the second diode when the first, second and third switches are off;
a resistor, configured to be coupled in series with the LED device; and
a controller, coupled between the resistor and the at least two switches and configured to keep the current through the LED device stable around a predetermined current value by controlling the at least two switches based on a voltage across the resistor, wherein the at least two switches are turned on or off synchronously.