Remove locale name provider
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import 'package:flutter_localized_locales/flutter_localized_locales.dart';
|
||||
import 'package:hiddify/gen/fonts.gen.dart';
|
||||
import 'package:hiddify/gen/translations.g.dart';
|
||||
|
||||
@@ -6,8 +5,12 @@ extension AppLocaleX on AppLocale {
|
||||
String get preferredFontFamily =>
|
||||
this == AppLocale.fa ? FontFamily.shabnam : "";
|
||||
|
||||
String get localeName =>
|
||||
LocaleNamesLocalizationsDelegate
|
||||
.nativeLocaleNames[flutterLocale.toString()] ??
|
||||
name;
|
||||
String get localeName => switch (flutterLocale.toString()) {
|
||||
"en" => "English",
|
||||
"fa" => "فارسی",
|
||||
"ru" => "Русский",
|
||||
"zh" || "zh_CN" => "中文",
|
||||
"tr" => "Türkçe",
|
||||
_ => "Unknown",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user