mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: fallback to supported locale if easy_localization doesn't support device locale
This commit is contained in:
parent
e9ba1e1886
commit
62bafce0b2
@ -47,7 +47,7 @@ class AppearanceSettingModel extends ChangeNotifier with EquatableMixin {
|
||||
|
||||
void setLocale(BuildContext context, Locale newLocale) {
|
||||
if (_locale != newLocale) {
|
||||
if (context.supportedLocales.contains(newLocale)) {
|
||||
if (!context.supportedLocales.contains(newLocale)) {
|
||||
Log.error("Unsupported locale: $newLocale");
|
||||
newLocale = const Locale('en');
|
||||
Log.debug("Fallback to locale: $newLocale");
|
||||
|
Loading…
x
Reference in New Issue
Block a user