themeMode method

ThemeMode themeMode()

Loads the User's preferred ThemeMode from local or remote storage.

Implementation

ThemeMode themeMode() {
  var themeModeIndex = _prefs.getInt("themeMode") ?? 0;
  ThemeMode result = ThemeMode.system;
  if (themeModeIndex == 1) {
    result = ThemeMode.light;
  } else if (themeModeIndex == 2) {
    result = ThemeMode.dark;
  }
  return result;
}