setBrightness method
Sets the screen brightness to the specified value.
The brightness parameter should be a value between 0.0 (minimum brightness) and 1.0 (maximum brightness).
Throws an Exception if the brightness value is outside the valid range.
Implementation
Future<void> setBrightness(double brightness) async {
BrightnessVolumeManagerPlatform.instance.setBrightness(brightness);
}