From 124694447be48eecf510e45d21c5d32baba3c93c Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Wed, 15 Dec 2021 15:17:13 -0500 Subject: [PATCH] i10n theme names --- lib/l10n/intl_de.arb | 15 +++++++++++++- lib/l10n/intl_en.arb | 15 +++++++++++++- lib/l10n/intl_es.arb | 15 +++++++++++++- lib/l10n/intl_fr.arb | 15 +++++++++++++- lib/l10n/intl_it.arb | 15 +++++++++++++- lib/l10n/intl_pl.arb | 15 +++++++++++++- lib/l10n/intl_pt.arb | 15 +++++++++++++- lib/l10n/intl_ru.arb | 15 +++++++++++++- lib/themes/cwtch.dart | 5 +---- lib/themes/ghost.dart | 5 +---- lib/themes/mermaid.dart | 5 +---- lib/themes/midnight.dart | 5 +---- lib/themes/neon1.dart | 5 +---- lib/themes/neon2.dart | 5 +---- lib/themes/opaque.dart | 1 - lib/themes/pumpkin.dart | 5 +---- lib/themes/vampire.dart | 5 +---- lib/themes/witch.dart | 5 +---- lib/views/globalsettingsview.dart | 33 ++++++++++++++++++++++++++++--- 19 files changed, 151 insertions(+), 48 deletions(-) diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index 71936b39..3c7bdb25 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -1,6 +1,19 @@ { "@@locale": "de", - "@@last_modified": "2021-12-13T23:43:26+01:00", + "@@last_modified": "2021-12-15T20:46:48+01:00", + "themeColorLabel": "Color Theme", + "themeNameNeon2": "Neon2", + "themeNameNeon1": "Neon1", + "themeNameMidnight": "Midnight", + "themeNameMermaid": "Mermaid", + "themeNamePumpkin": "Pumpkin", + "themeNameGhost": "Ghost", + "themeNameVampire": "Vampire", + "themeNameWitch": "Witch", + "themeNameCwtch": "Cwtch", + "settingDownloadFolder": "Download Folder", + "settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.", + "settingImagePreviews": "Image Previews and Profile Pictures", "experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages", "enableExperimentClickableLinks": "Enable Clickable Links", "serverConnectionsLabel": "Connection", diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index f1546402..42b7fca9 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1,6 +1,19 @@ { "@@locale": "en", - "@@last_modified": "2021-12-13T23:43:26+01:00", + "@@last_modified": "2021-12-15T20:46:48+01:00", + "themeColorLabel": "Color Theme", + "themeNameNeon2": "Neon2", + "themeNameNeon1": "Neon1", + "themeNameMidnight": "Midnight", + "themeNameMermaid": "Mermaid", + "themeNamePumpkin": "Pumpkin", + "themeNameGhost": "Ghost", + "themeNameVampire": "Vampire", + "themeNameWitch": "Witch", + "themeNameCwtch": "Cwtch", + "settingDownloadFolder": "Download Folder", + "settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.", + "settingImagePreviews": "Image Previews and Profile Pictures", "experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages", "enableExperimentClickableLinks": "Enable Clickable Links", "serverConnectionsLabel": "Connection", diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index ce52d391..809b2d91 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -1,6 +1,19 @@ { "@@locale": "es", - "@@last_modified": "2021-12-13T23:43:26+01:00", + "@@last_modified": "2021-12-15T20:46:48+01:00", + "themeColorLabel": "Color Theme", + "themeNameNeon2": "Neon2", + "themeNameNeon1": "Neon1", + "themeNameMidnight": "Midnight", + "themeNameMermaid": "Mermaid", + "themeNamePumpkin": "Pumpkin", + "themeNameGhost": "Ghost", + "themeNameVampire": "Vampire", + "themeNameWitch": "Witch", + "themeNameCwtch": "Cwtch", + "settingDownloadFolder": "Download Folder", + "settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.", + "settingImagePreviews": "Image Previews and Profile Pictures", "experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages", "enableExperimentClickableLinks": "Enable Clickable Links", "serverConnectionsLabel": "Connection", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index 5f4b6fc2..8140da2c 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -1,6 +1,19 @@ { "@@locale": "fr", - "@@last_modified": "2021-12-13T23:43:26+01:00", + "@@last_modified": "2021-12-15T20:46:48+01:00", + "themeColorLabel": "Color Theme", + "themeNameNeon2": "Neon2", + "themeNameNeon1": "Neon1", + "themeNameMidnight": "Midnight", + "themeNameMermaid": "Mermaid", + "themeNamePumpkin": "Pumpkin", + "themeNameGhost": "Ghost", + "themeNameVampire": "Vampire", + "themeNameWitch": "Witch", + "themeNameCwtch": "Cwtch", + "settingDownloadFolder": "Download Folder", + "settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.", + "settingImagePreviews": "Image Previews and Profile Pictures", "experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages", "enableExperimentClickableLinks": "Enable Clickable Links", "serverMetricsLabel": "Métriques du serveur", diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index ece23e55..e30cfb70 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -1,6 +1,19 @@ { "@@locale": "it", - "@@last_modified": "2021-12-13T23:43:26+01:00", + "@@last_modified": "2021-12-15T20:46:48+01:00", + "themeColorLabel": "Color Theme", + "themeNameNeon2": "Neon2", + "themeNameNeon1": "Neon1", + "themeNameMidnight": "Midnight", + "themeNameMermaid": "Mermaid", + "themeNamePumpkin": "Pumpkin", + "themeNameGhost": "Ghost", + "themeNameVampire": "Vampire", + "themeNameWitch": "Witch", + "themeNameCwtch": "Cwtch", + "settingDownloadFolder": "Download Folder", + "settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.", + "settingImagePreviews": "Image Previews and Profile Pictures", "experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages", "enableExperimentClickableLinks": "Enable Clickable Links", "serverConnectionsLabel": "Connection", diff --git a/lib/l10n/intl_pl.arb b/lib/l10n/intl_pl.arb index a5d18aa7..78708ee7 100644 --- a/lib/l10n/intl_pl.arb +++ b/lib/l10n/intl_pl.arb @@ -1,6 +1,19 @@ { "@@locale": "pl", - "@@last_modified": "2021-12-13T23:43:26+01:00", + "@@last_modified": "2021-12-15T20:46:48+01:00", + "themeColorLabel": "Color Theme", + "themeNameNeon2": "Neon2", + "themeNameNeon1": "Neon1", + "themeNameMidnight": "Midnight", + "themeNameMermaid": "Mermaid", + "themeNamePumpkin": "Pumpkin", + "themeNameGhost": "Ghost", + "themeNameVampire": "Vampire", + "themeNameWitch": "Witch", + "themeNameCwtch": "Cwtch", + "settingDownloadFolder": "Download Folder", + "settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.", + "settingImagePreviews": "Image Previews and Profile Pictures", "experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages", "enableExperimentClickableLinks": "Enable Clickable Links", "serverConnectionsLabel": "Connection", diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index f41f5a06..a548ca3a 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -1,6 +1,19 @@ { "@@locale": "pt", - "@@last_modified": "2021-12-13T23:43:26+01:00", + "@@last_modified": "2021-12-15T20:46:48+01:00", + "themeColorLabel": "Color Theme", + "themeNameNeon2": "Neon2", + "themeNameNeon1": "Neon1", + "themeNameMidnight": "Midnight", + "themeNameMermaid": "Mermaid", + "themeNamePumpkin": "Pumpkin", + "themeNameGhost": "Ghost", + "themeNameVampire": "Vampire", + "themeNameWitch": "Witch", + "themeNameCwtch": "Cwtch", + "settingDownloadFolder": "Download Folder", + "settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.", + "settingImagePreviews": "Image Previews and Profile Pictures", "experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages", "enableExperimentClickableLinks": "Enable Clickable Links", "serverConnectionsLabel": "Connection", diff --git a/lib/l10n/intl_ru.arb b/lib/l10n/intl_ru.arb index d4137344..8751074d 100644 --- a/lib/l10n/intl_ru.arb +++ b/lib/l10n/intl_ru.arb @@ -1,6 +1,19 @@ { "@@locale": "ru", - "@@last_modified": "2021-12-13T23:43:26+01:00", + "@@last_modified": "2021-12-15T20:46:48+01:00", + "themeColorLabel": "Color Theme", + "themeNameNeon2": "Neon2", + "themeNameNeon1": "Neon1", + "themeNameMidnight": "Midnight", + "themeNameMermaid": "Mermaid", + "themeNamePumpkin": "Pumpkin", + "themeNameGhost": "Ghost", + "themeNameVampire": "Vampire", + "themeNameWitch": "Witch", + "themeNameCwtch": "Cwtch", + "settingDownloadFolder": "Download Folder", + "settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.", + "settingImagePreviews": "Image Previews and Profile Pictures", "experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages", "enableExperimentClickableLinks": "Enable Clickable Links", "serverConnectionsLabel": "Connection", diff --git a/lib/themes/cwtch.dart b/lib/themes/cwtch.dart index 7b272962..470ad617 100644 --- a/lib/themes/cwtch.dart +++ b/lib/themes/cwtch.dart @@ -5,8 +5,7 @@ import 'package:flutter/material.dart'; import 'opaque.dart'; -final cwtch_name = "Cwtch"; // todo translate -final cwtch_theme = "cwtch"; +const cwtch_theme = "cwtch"; final Color darkGreyPurple = Color(0xFF281831); final Color deepPurple = Color(0xFF422850); @@ -45,7 +44,6 @@ class CwtchDark extends OpaqueThemeType { static final Color settings = whiteishPurple; static final Color accent = hotPink; - get name => cwtch_name; get theme => cwtch_theme; get mode => mode_dark; @@ -91,7 +89,6 @@ class CwtchLight extends OpaqueThemeType { static final Color settings = darkPurple; static final Color accent = hotPink; - get name => cwtch_name; get theme => cwtch_theme; get mode => mode_light; diff --git a/lib/themes/ghost.dart b/lib/themes/ghost.dart index 6f870190..41fe3806 100644 --- a/lib/themes/ghost.dart +++ b/lib/themes/ghost.dart @@ -6,8 +6,7 @@ import 'package:flutter/material.dart'; import 'opaque.dart'; -final ghost_theme = "ghost"; -final ghost_name = "Ghost"; //Todo translate +const ghost_theme = "ghost"; OpaqueThemeType GetGhostTheme(String mode) { if (mode == mode_dark) { @@ -26,7 +25,6 @@ class GhostDark extends CwtchDark { static final Color settings = Color(0xFFFDFFFD); static final Color accent = Color(0xFFD20070); - get name => ghost_name; get theme => ghost_theme; get mode => mode_dark; @@ -51,7 +49,6 @@ class GhostLight extends CwtchLight { static final Color settings = Color(0xFF0D0D1F); static final Color accent = Color(0xFFD20070); - get name => ghost_name; get theme => ghost_theme; get mode => mode_light; diff --git a/lib/themes/mermaid.dart b/lib/themes/mermaid.dart index a8cde812..95937e85 100644 --- a/lib/themes/mermaid.dart +++ b/lib/themes/mermaid.dart @@ -6,8 +6,7 @@ import 'package:flutter/material.dart'; import 'opaque.dart'; -final mermaid_theme = "mermaid"; -final mermaid_name = "Mermaid"; //Todo translate +const mermaid_theme = "mermaid"; OpaqueThemeType GetMermaidTheme(String mode) { if (mode == mode_dark) { @@ -26,7 +25,6 @@ class MermaidDark extends CwtchDark { static final Color settings = Color(0xFFF7FCFD); static final Color accent = Color(0xFF8E64A5); - get name => mermaid_name; get theme => mermaid_theme; get mode => mode_dark; @@ -51,7 +49,6 @@ class MermaidLight extends CwtchLight { static final Color settings = Color(0xFF102426); static final Color accent = Color(0xFF8E64A5); - get name => mermaid_name; get theme => mermaid_theme; get mode => mode_light; diff --git a/lib/themes/midnight.dart b/lib/themes/midnight.dart index e6c4507f..4dd1b771 100644 --- a/lib/themes/midnight.dart +++ b/lib/themes/midnight.dart @@ -6,8 +6,7 @@ import 'package:flutter/material.dart'; import 'opaque.dart'; -final midnight_theme = "midnight"; -final midnight_name = "Midnight"; //Todo translate +const midnight_theme = "midnight"; OpaqueThemeType GetMidnightTheme(String mode) { if (mode == mode_dark) { @@ -26,7 +25,6 @@ class MidnightDark extends CwtchDark { static final Color settings = Color(0xFFFFFDFF); static final Color accent = Color(0xFFD20070); - get name => midnight_name; get theme => midnight_theme; get mode => mode_dark; @@ -51,7 +49,6 @@ class MidnightLight extends CwtchLight { static final Color settings = Color(0xFF1B1B1B); static final Color accent = Color(0xFFD20070); - get name => midnight_name; get theme => midnight_theme; get mode => mode_light; diff --git a/lib/themes/neon1.dart b/lib/themes/neon1.dart index 2b4e396d..196fcbf9 100644 --- a/lib/themes/neon1.dart +++ b/lib/themes/neon1.dart @@ -6,8 +6,7 @@ import 'package:flutter/material.dart'; import 'opaque.dart'; -final neon1_theme = "neon1"; -final neon1_name = "Neon1"; //Todo translate +const neon1_theme = "neon1"; OpaqueThemeType GetNeon1Theme(String mode) { if (mode == mode_dark) { @@ -26,7 +25,6 @@ class Neon1Dark extends CwtchDark { static final Color settings = Color(0xFFFFFDFF); static final Color accent = Color(0xFFA604FE); - get name => neon1_name; get theme => neon1_theme; get mode => mode_dark; @@ -73,7 +71,6 @@ class Neon1Light extends CwtchLight { static final Color settings = Color(0xFF290826); static final Color accent = Color(0xFFA604FE); - get name => neon1_name; get theme => neon1_theme; get mode => mode_light; diff --git a/lib/themes/neon2.dart b/lib/themes/neon2.dart index ee90520f..c2d551a0 100644 --- a/lib/themes/neon2.dart +++ b/lib/themes/neon2.dart @@ -6,8 +6,7 @@ import 'package:flutter/material.dart'; import 'opaque.dart'; -final neon2_theme = "neon2"; -final neon2_name = "Neon2"; //Todo translate +const neon2_theme = "neon2"; OpaqueThemeType GetNeon2Theme(String mode) { if (mode == mode_dark) { @@ -26,7 +25,6 @@ class Neon2Dark extends CwtchDark { static final Color settings = Color(0xFFFFFDFF); static final Color accent = Color(0xFFA604FE); - get name => neon2_name; get theme => neon2_theme; get mode => mode_dark; @@ -51,7 +49,6 @@ class Neon2Light extends CwtchLight { static final Color settings = Color(0xFF290826); static final Color accent = Color(0xFFA604FE); - get name => neon2_name; get theme => neon2_theme; get mode => mode_light; diff --git a/lib/themes/opaque.dart b/lib/themes/opaque.dart index 27eb5dec..d71df21f 100644 --- a/lib/themes/opaque.dart +++ b/lib/themes/opaque.dart @@ -62,7 +62,6 @@ Color darken(Color color, [double amount = 0.15]) { abstract class OpaqueThemeType { static final Color red = Color(0xFFFF0000); - get name => "Dummy"; get theme => "dummy"; get mode => mode_light; diff --git a/lib/themes/pumpkin.dart b/lib/themes/pumpkin.dart index da779341..943c73da 100644 --- a/lib/themes/pumpkin.dart +++ b/lib/themes/pumpkin.dart @@ -6,8 +6,7 @@ import 'package:flutter/material.dart'; import 'opaque.dart'; -final pumpkin_theme = "pumpkin"; -final pumpkin_name = "Pumpkin"; //Todo translate +const pumpkin_theme = "pumpkin"; OpaqueThemeType GetPumpkinTheme(String mode) { if (mode == mode_dark) { @@ -26,7 +25,6 @@ class PumpkinDark extends CwtchDark { static final Color settings = Color(0xFFFFFBF6); static final Color accent = Color(0xFF8E64A5); - get name => pumpkin_name; get theme => pumpkin_theme; get mode => mode_dark; @@ -51,7 +49,6 @@ class PumpkinLight extends CwtchLight { static final Color settings = Color(0xFF281831); static final Color accent = Color(0xFF8E64A5); - get name => pumpkin_name; get theme => pumpkin_theme; get mode => mode_light; diff --git a/lib/themes/vampire.dart b/lib/themes/vampire.dart index a0ba8191..459dfe7b 100644 --- a/lib/themes/vampire.dart +++ b/lib/themes/vampire.dart @@ -6,8 +6,7 @@ import 'package:flutter/material.dart'; import 'opaque.dart'; -final vampire_theme = "vampire"; -final vampire_name = "Vampire"; //Todo translate +const vampire_theme = "vampire"; OpaqueThemeType GetVampireTheme(String mode) { if (mode == mode_dark) { @@ -26,7 +25,6 @@ class VampireDark extends CwtchDark { static final Color settings = Color(0xFFFDFFFD); static final Color accent = Color(0xFF8E64A5); - get name => vampire_name; get theme => vampire_theme; get mode => mode_dark; @@ -51,7 +49,6 @@ class VampireLight extends CwtchLight { static final Color settings = Color(0xFF281831); static final Color accent = Color(0xFF8E64A5); - get name => vampire_name; get theme => vampire_theme; get mode => mode_light; diff --git a/lib/themes/witch.dart b/lib/themes/witch.dart index 069051ed..ebc7d17b 100644 --- a/lib/themes/witch.dart +++ b/lib/themes/witch.dart @@ -6,8 +6,7 @@ import 'package:flutter/material.dart'; import 'opaque.dart'; -final witch_theme = "witch"; -final witch_name = "Witch"; //Todo translate +const witch_theme = "witch"; OpaqueThemeType GetWitchTheme(String mode) { if (mode == mode_dark) { @@ -26,7 +25,6 @@ class WitchDark extends CwtchDark { static final Color settings = Color(0xFFFDFFFD); static final Color accent = Color(0xFFD20070); - get name => witch_name; get theme => witch_theme; get mode => mode_dark; @@ -51,7 +49,6 @@ class WitchLight extends CwtchLight { static final Color settings = Color(0xFF0E1E0E); static final Color accent = Color(0xFFD20070); - get name => witch_name; get theme => witch_theme; get mode => mode_light; diff --git a/lib/views/globalsettingsview.dart b/lib/views/globalsettingsview.dart index 3cdd04a5..d11847f6 100644 --- a/lib/views/globalsettingsview.dart +++ b/lib/views/globalsettingsview.dart @@ -2,7 +2,16 @@ import 'dart:convert'; import 'dart:io'; import 'package:cwtch/cwtch_icons_icons.dart'; import 'package:cwtch/models/servers.dart'; +import 'package:cwtch/themes/cwtch.dart'; +import 'package:cwtch/themes/ghost.dart'; +import 'package:cwtch/themes/mermaid.dart'; +import 'package:cwtch/themes/midnight.dart'; +import 'package:cwtch/themes/neon1.dart'; +import 'package:cwtch/themes/neon2.dart'; import 'package:cwtch/themes/opaque.dart'; +import 'package:cwtch/themes/pumpkin.dart'; +import 'package:cwtch/themes/vampire.dart'; +import 'package:cwtch/themes/witch.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:flutter/material.dart'; import 'package:cwtch/settings.dart'; @@ -82,7 +91,7 @@ class _GlobalSettingsViewState extends State { secondary: Icon(CwtchIcons.change_theme, color: settings.current().mainTextColor), ), ListTile( - title: Text("Colour Theme"), + title: Text(AppLocalizations.of(context)!.themeColorLabel), //AppLocalizations.of(context)!.settingTheme)), trailing: DropdownButton( value: Provider.of(context).theme.theme, @@ -95,9 +104,11 @@ class _GlobalSettingsViewState extends State { items: themes.keys.map>((String themeId) { return DropdownMenuItem( value: themeId, - child: Text(themes[themeId]?[mode_light]?.name ?? "Unknown"), //todo translate + child: Text(getThemeName(context, themeId)), ); - }).toList())), + }).toList()), + leading: Icon(CwtchIcons.change_theme, color: settings.current().mainTextColor), + ), ListTile( title: Text(AppLocalizations.of(context)!.settingUIColumnPortrait, style: TextStyle(color: settings.current().mainTextColor)), leading: Icon(Icons.table_chart, color: settings.current().mainTextColor), @@ -318,6 +329,22 @@ String getLanguageFull(context, String languageCode) { return languageCode; } +/// Since we don't seem to able to dynamically pull translations, this function maps themes to their names +String getThemeName(context, String theme) { + switch (theme) { + case cwtch_theme: return AppLocalizations.of(context)!.themeNameCwtch; + case ghost_theme: return AppLocalizations.of(context)!.themeNameGhost; + case mermaid_theme: return AppLocalizations.of(context)!.themeNameMermaid; + case midnight_theme: return AppLocalizations.of(context)!.themeNameMidnight; + case neon1_theme: return AppLocalizations.of(context)!.themeNameNeon1; + case neon2_theme: return AppLocalizations.of(context)!.themeNameNeon2; + case pumpkin_theme: return AppLocalizations.of(context)!.themeNamePumpkin; + case vampire_theme: return AppLocalizations.of(context)!.themeNameVampire; + case witch_theme: return AppLocalizations.of(context)!.themeNameWitch; + } + return theme; +} + /// Send an UpdateGlobalSettings to the Event Bus saveSettings(context) { var settings = Provider.of(context, listen: false);