Refactor
This commit is contained in:
13
lib/core/localization/locale_extensions.dart
Normal file
13
lib/core/localization/locale_extensions.dart
Normal file
@@ -0,0 +1,13 @@
|
||||
import 'package:flutter_localized_locales/flutter_localized_locales.dart';
|
||||
import 'package:hiddify/gen/fonts.gen.dart';
|
||||
import 'package:hiddify/gen/translations.g.dart';
|
||||
|
||||
extension AppLocaleX on AppLocale {
|
||||
String get preferredFontFamily =>
|
||||
this == AppLocale.fa ? FontFamily.shabnam : "";
|
||||
|
||||
String get localeName =>
|
||||
LocaleNamesLocalizationsDelegate
|
||||
.nativeLocaleNames[flutterLocale.toString()] ??
|
||||
name;
|
||||
}
|
||||
Reference in New Issue
Block a user