@@ -62,17 +62,15 @@ import 'app_localizations_en.dart';
6262/// be consistent with the languages listed in the AppLocalizations.supportedLocales
6363/// property.
6464abstract class AppLocalizations {
65- AppLocalizations (String locale)
66- : localeName = intl.Intl .canonicalizedLocale (locale.toString ());
65+ AppLocalizations (String locale) : localeName = intl.Intl .canonicalizedLocale (locale.toString ());
6766
6867 final String localeName;
6968
7069 static AppLocalizations of (BuildContext context) {
7170 return Localizations .of <AppLocalizations >(context, AppLocalizations )! ;
7271 }
7372
74- static const LocalizationsDelegate <AppLocalizations > delegate =
75- _AppLocalizationsDelegate ();
73+ static const LocalizationsDelegate <AppLocalizations > delegate = _AppLocalizationsDelegate ();
7674
7775 /// A list of this localizations delegate along with the default localizations
7876 /// delegates.
@@ -84,18 +82,17 @@ abstract class AppLocalizations {
8482 /// Additional delegates can be added by appending to this list in
8583 /// MaterialApp. This list does not have to be used at all if a custom list
8684 /// of delegates is preferred or required.
87- static const List <LocalizationsDelegate <dynamic >> localizationsDelegates =
88- < LocalizationsDelegate <dynamic >> [
89- delegate,
90- GlobalMaterialLocalizations .delegate,
91- GlobalCupertinoLocalizations .delegate,
92- GlobalWidgetsLocalizations .delegate,
93- ];
85+ static const List <LocalizationsDelegate <dynamic >> localizationsDelegates = < LocalizationsDelegate <dynamic >> [
86+ delegate,
87+ GlobalMaterialLocalizations .delegate,
88+ GlobalCupertinoLocalizations .delegate,
89+ GlobalWidgetsLocalizations .delegate,
90+ ];
9491
9592 /// A list of this localizations delegate's supported locales.
9693 static const List <Locale > supportedLocales = < Locale > [
9794 Locale ('ar' ),
98- Locale ('en' ),
95+ Locale ('en' )
9996 ];
10097
10198 /// Headline for the main authentication page
@@ -1592,17 +1589,17 @@ abstract class AppLocalizations {
15921589 /// **'How often an ad can appear for this user role (e.g., a value of 5 means an ad could be placed after every 5 news items).'**
15931590 String get adFrequencyDescription;
15941591
1595- /// Description for the Saved Headlines Filter Limits section
1592+ /// Title for the Saved Feed Filter Limits section
15961593 ///
15971594 /// In en, this message translates to:
1598- /// **'Set limits on the number of saved feed filters for each user tier. '**
1599- String get savedFeedFilterLimitsDescription ;
1595+ /// **'Saved Filter Limits '**
1596+ String get savedFeedFilterLimitsTitle ;
16001597
1601- /// Title for the Saved Feed Filter Limits section
1598+ /// Description for the Saved Headlines Filter Limits section
16021599 ///
16031600 /// In en, this message translates to:
1604- /// **'Saved Feed Filter Limits '**
1605- String get savedFeedFilterLimitsTitle ;
1601+ /// **'Set limits on the number of saved feed filters for each user tier. '**
1602+ String get savedFeedFilterLimitsDescription ;
16061603
16071604 /// Label for Ad Placement Interval
16081605 ///
@@ -2841,8 +2838,7 @@ abstract class AppLocalizations {
28412838 String get saveAdMessage;
28422839}
28432840
2844- class _AppLocalizationsDelegate
2845- extends LocalizationsDelegate <AppLocalizations > {
2841+ class _AppLocalizationsDelegate extends LocalizationsDelegate <AppLocalizations > {
28462842 const _AppLocalizationsDelegate ();
28472843
28482844 @override
@@ -2851,26 +2847,25 @@ class _AppLocalizationsDelegate
28512847 }
28522848
28532849 @override
2854- bool isSupported (Locale locale) =>
2855- < String > ['ar' , 'en' ].contains (locale.languageCode);
2850+ bool isSupported (Locale locale) => < String > ['ar' , 'en' ].contains (locale.languageCode);
28562851
28572852 @override
28582853 bool shouldReload (_AppLocalizationsDelegate old) => false ;
28592854}
28602855
28612856AppLocalizations lookupAppLocalizations (Locale locale) {
2857+
2858+
28622859 // Lookup logic when only language code is specified.
28632860 switch (locale.languageCode) {
2864- case 'ar' :
2865- return AppLocalizationsAr ();
2866- case 'en' :
2867- return AppLocalizationsEn ();
2861+ case 'ar' : return AppLocalizationsAr ();
2862+ case 'en' : return AppLocalizationsEn ();
28682863 }
28692864
28702865 throw FlutterError (
28712866 'AppLocalizations.delegate failed to load unsupported locale "$locale ". This is likely '
28722867 'an issue with the localizations generation tool. Please file an issue '
28732868 'on GitHub with a reproducible sample app and the gen-l10n configuration '
2874- 'that was used.' ,
2869+ 'that was used.'
28752870 );
28762871}
0 commit comments