Language fix for #185

This commit is contained in:
Imran Remtulla
2022-12-22 07:57:21 -05:00
parent 0da7a36f1a
commit 45a23e9025
2 changed files with 11 additions and 3 deletions

View File

@@ -145,8 +145,11 @@ class _SettingsPageState extends State<SettingsPage> {
],
onChanged: (value) {
settingsProvider.forcedLocale = value;
context.setLocale(Locale(settingsProvider.forcedLocale ??
context.fallbackLocale!.languageCode));
if (value != null) {
context.setLocale(Locale(value));
} else {
context.resetLocale();
}
});
var intervalDropdown = DropdownButtonFormField(