From 2ddd459f25fe64c794e7832ee814fecf4e64eeec Mon Sep 17 00:00:00 2001 From: MaD Date: Mon, 16 Dec 2024 23:54:11 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D0=BF=D1=8B=D1=82=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B2=20=D0=BB=D0=BE=D0=BA=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0=D1=86?= =?UTF-8?q?=D0=B8=D1=8E=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Components/locale/l10n/app_locale.dart | 32 ------------------- lib/Components/locale/l10n/app_locale_ru.dart | 2 +- 2 files changed, 1 insertion(+), 33 deletions(-) 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 {