diff --git a/lib/Components/locale/l10n/app_locale.dart b/lib/Components/locale/l10n/app_locale.dart index 3c31ab0..0dd0f4f 100644 --- a/lib/Components/locale/l10n/app_locale.dart +++ b/lib/Components/locale/l10n/app_locale.dart @@ -95,35 +95,3 @@ abstract class AppLocale { String get heroNoImage; String get heroNoDescription; } - -class _AppLocaleDelegate extends LocalizationsDelegate { - const _AppLocaleDelegate(); - - @override - Future load(Locale locale) { - return SynchronousFuture(lookupAppLocale(locale)); - } - - @override - bool isSupported(Locale locale) => ['en', 'ru'].contains(locale.languageCode); - - @override - bool shouldReload(_AppLocaleDelegate old) => false; -} - -AppLocale lookupAppLocale(Locale locale) { - - - // Lookup logic when only language code is specified. - switch (locale.languageCode) { - case 'en': return AppLocaleEn(); - case 'ru': return AppLocaleRu(); - } - - throw FlutterError( - 'AppLocale.delegate failed to load unsupported locale "$locale". This is likely ' - 'an issue with the localizations generation tool. Please file an issue ' - 'on GitHub with a reproducible sample app and the gen-l10n configuration ' - 'that was used.' - ); -} diff --git a/lib/Components/locale/l10n/app_locale_ru.dart b/lib/Components/locale/l10n/app_locale_ru.dart index 6bf80c9..1a0e8ef 100644 --- a/lib/Components/locale/l10n/app_locale_ru.dart +++ b/lib/Components/locale/l10n/app_locale_ru.dart @@ -1,6 +1,6 @@ import 'app_locale.dart'; -import 'app_locale.dart'; +// ignore_for_file: type=lint /// The translations for Russian (`ru`). class AppLocaleRu extends AppLocale {