getUserPreferenceForBrightness method

Future<void> getUserPreferenceForBrightness()

Implementation

Future<void> getUserPreferenceForBrightness() async {
  prefs = await SharedPreferences.getInstance();
  double BrightnessValue = (await prefs?.getDouble('brightness')) ?? 0.5;
  setBrightness(BrightnessValue);
  print("Last Brightness used was ${BrightnessValue}");
}