setBrightness method
Implementation
Future<void> setBrightness(double brightnes) async {
if (!manageBrightness) {
return;
}
if (!desktopOrWeb) {
try {
brightness.value = brightnes;
ScreenBrightness().setScreenBrightness(brightnes);
setUserPreferenceForBrightness();
} catch (e) {
customDebugPrint(e);
throw 'Failed to set brightness';
}
}
}