getCurrentBrightness method
Implementation
Future<void> getCurrentBrightness() async {
if (!windows) {
try {
_currentBrightness.value = await ScreenBrightness().current;
} catch (e) {
print(e);
throw 'Failed to get current brightness';
//return 0;
}
}
//return 0;
}