diff --git a/lib/settings.dart b/lib/settings.dart index c93f9b08..29e76f40 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -88,6 +88,7 @@ class Settings extends ChangeNotifier { bool get useSemanticDebugger => _useSemanticDebugger; String? _themeId; + String? get themeId => _themeId; String? _mode; OpaqueThemeType get theme => themeloader.getTheme(_themeId, _mode); void setTheme(String themeId, String mode) { @@ -481,7 +482,7 @@ class Settings extends ChangeNotifier { dynamic asJson() { return { "Locale": this.locale.toString(), - "Theme": theme.theme, + "Theme": _themeId, "ThemeMode": theme.mode, "ThemeImages": _themeImages, "PreviousPid": -1, diff --git a/lib/views/globalsettingsappearanceview.dart b/lib/views/globalsettingsappearanceview.dart index 40d9470c..59abce76 100644 --- a/lib/views/globalsettingsappearanceview.dart +++ b/lib/views/globalsettingsappearanceview.dart @@ -91,7 +91,7 @@ class _GlobalSettingsAppearanceViewState extends State( key: Key("DropdownTheme"), isExpanded: true, - value: Provider.of(context).theme.theme, + value: Provider.of(context).themeId, onChanged: (String? newValue) { setState(() { settings.setTheme(newValue!, settings.theme.mode); @@ -101,7 +101,7 @@ class _GlobalSettingsAppearanceViewState extends State>((String themeId) { return DropdownMenuItem( value: themeId, - child: Text(getThemeName(context, themeId), style: settings.scaleFonts(defaultDropDownMenuItemTextStyle)), //"ddi_$themeId", key: Key("ddi_$themeId")), + child: Text(getThemeName(context, settings, themeId), style: settings.scaleFonts(defaultDropDownMenuItemTextStyle)), //"ddi_$themeId", key: Key("ddi_$themeId")), ); }).toList())), leading: Icon(Icons.palette, color: settings.current().mainTextColor), @@ -329,7 +329,7 @@ class _GlobalSettingsAppearanceViewState extends State