setBrightness method
Implementation
void setBrightness(double brightness) async {
await ScreenBrightness().setScreenBrightness(brightness);
await Future.delayed(const Duration(seconds: 5));
showBrightnessWidget = false;
updateUI();
}
void setBrightness(double brightness) async {
await ScreenBrightness().setScreenBrightness(brightness);
await Future.delayed(const Duration(seconds: 5));
showBrightnessWidget = false;
updateUI();
}