There has been a built-in flashlight on iPhones and iPod touches ever since the release of the Control Center in iOS 7, but it has stayed exactly the same since then. In iOS 10 and higher, you can actually adjust the brightness from the toggle if you have 3D Touch.
First, swipe up the Control Center from any screen, then just force-press the flashlight icon until a menu pops up allowing you to choose between Bright Intensity, Medium Intensity, and Low Intensity. The difference between them is drastic, covering all the bases. In the new iOS 11, the names of the intensity values are gone, but there are four options instead of just three.
If you're using iOS 10, you do need a device with 3D Touch to adjust flashlight brightness right now, so the 6s and iPhone 7 models are the only devices it'll work with right now. If you're using iOS 11, it will work on all iPhone models using either 3D Touch or a long-press.
Have an iPhone? Check out all 200+ new features coming in iOS 13.