loadThemeMode method
Implementation
void loadThemeMode() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
int? themeTypeIndex = prefs.getInt('themeType');
if (themeTypeIndex == null) {
_themeMode = ThemeMode.system;
_themeType = ThemeType.system;
} else {
_themeType = ThemeType.values[themeTypeIndex];
_themeMode = _themeTypeToThemeMode(_themeType);
}
notifyListeners();
}