diff --git a/lib/content_management/view/create_source_page.dart b/lib/content_management/view/create_source_page.dart index 7487e05..d971a0c 100644 --- a/lib/content_management/view/create_source_page.dart +++ b/lib/content_management/view/create_source_page.dart @@ -166,6 +166,9 @@ class _CreateSourceViewState extends State<_CreateSourceView> { decoration: InputDecoration( labelText: l10n.language, border: const OutlineInputBorder(), + helperText: state.languagesIsLoadingMore + ? l10n.loadingFullList + : null, ), items: [ DropdownMenuItem(value: null, child: Text(l10n.none)), @@ -176,9 +179,11 @@ class _CreateSourceViewState extends State<_CreateSourceView> { ), ), ], - onChanged: (value) => context - .read() - .add(CreateSourceLanguageChanged(value)), + onChanged: state.languagesIsLoadingMore + ? null + : (value) => context + .read() + .add(CreateSourceLanguageChanged(value)), ), const SizedBox(height: AppSpacing.lg), DropdownButtonFormField( @@ -206,6 +211,9 @@ class _CreateSourceViewState extends State<_CreateSourceView> { decoration: InputDecoration( labelText: l10n.headquarters, border: const OutlineInputBorder(), + helperText: state.countriesIsLoadingMore + ? l10n.loadingFullList + : null, ), items: [ DropdownMenuItem(value: null, child: Text(l10n.none)), @@ -232,9 +240,11 @@ class _CreateSourceViewState extends State<_CreateSourceView> { ), ), ], - onChanged: (value) => context - .read() - .add(CreateSourceHeadquartersChanged(value)), + onChanged: state.countriesIsLoadingMore + ? null + : (value) => context + .read() + .add(CreateSourceHeadquartersChanged(value)), ), const SizedBox(height: AppSpacing.lg), DropdownButtonFormField( diff --git a/lib/content_management/view/edit_headline_page.dart b/lib/content_management/view/edit_headline_page.dart index bd92f72..42fb440 100644 --- a/lib/content_management/view/edit_headline_page.dart +++ b/lib/content_management/view/edit_headline_page.dart @@ -287,6 +287,9 @@ class _EditHeadlineViewState extends State<_EditHeadlineView> { decoration: InputDecoration( labelText: l10n.countryName, border: const OutlineInputBorder(), + helperText: state.countriesIsLoadingMore + ? l10n.loadingFullList + : null, ), items: [ DropdownMenuItem(value: null, child: Text(l10n.none)), @@ -313,9 +316,11 @@ class _EditHeadlineViewState extends State<_EditHeadlineView> { ), ), ], - onChanged: (value) => context - .read() - .add(EditHeadlineCountryChanged(value)), + onChanged: state.countriesIsLoadingMore + ? null + : (value) => context + .read() + .add(EditHeadlineCountryChanged(value)), ), const SizedBox(height: AppSpacing.lg), DropdownButtonFormField( diff --git a/lib/content_management/view/edit_source_page.dart b/lib/content_management/view/edit_source_page.dart index edb25a4..7cc0473 100644 --- a/lib/content_management/view/edit_source_page.dart +++ b/lib/content_management/view/edit_source_page.dart @@ -196,6 +196,9 @@ class _EditSourceViewState extends State<_EditSourceView> { decoration: InputDecoration( labelText: l10n.language, border: const OutlineInputBorder(), + helperText: state.languagesIsLoadingMore + ? l10n.loadingFullList + : null, ), items: [ DropdownMenuItem(value: null, child: Text(l10n.none)), @@ -206,9 +209,11 @@ class _EditSourceViewState extends State<_EditSourceView> { ), ), ], - onChanged: (value) => context - .read() - .add(EditSourceLanguageChanged(value)), + onChanged: state.languagesIsLoadingMore + ? null + : (value) => context + .read() + .add(EditSourceLanguageChanged(value)), ), const SizedBox(height: AppSpacing.lg), DropdownButtonFormField( @@ -236,6 +241,9 @@ class _EditSourceViewState extends State<_EditSourceView> { decoration: InputDecoration( labelText: l10n.headquarters, border: const OutlineInputBorder(), + helperText: state.countriesIsLoadingMore + ? l10n.loadingFullList + : null, ), items: [ DropdownMenuItem(value: null, child: Text(l10n.none)), @@ -262,9 +270,11 @@ class _EditSourceViewState extends State<_EditSourceView> { ), ), ], - onChanged: (value) => context - .read() - .add(EditSourceHeadquartersChanged(value)), + onChanged: state.countriesIsLoadingMore + ? null + : (value) => context + .read() + .add(EditSourceHeadquartersChanged(value)), ), const SizedBox(height: AppSpacing.lg), DropdownButtonFormField( diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index b88c8ce..ef0eb1f 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -1328,6 +1328,12 @@ abstract class AppLocalizations { /// **'Loading data...'** String get loadingData; + /// Message displayed in a dropdown when its full list of items is being loaded in the background. + /// + /// In en, this message translates to: + /// **'Loading full list...'** + String get loadingFullList; + /// Title for the Create Source page /// /// In en, this message translates to: diff --git a/lib/l10n/app_localizations_ar.dart b/lib/l10n/app_localizations_ar.dart index 04471a0..9aaa4b2 100644 --- a/lib/l10n/app_localizations_ar.dart +++ b/lib/l10n/app_localizations_ar.dart @@ -696,6 +696,9 @@ class AppLocalizationsAr extends AppLocalizations { @override String get loadingData => 'جاري تحميل البيانات...'; + @override + String get loadingFullList => 'جاري تحميل القائمة الكاملة...'; + @override String get createSource => 'إنشاء مصدر'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 462f47e..d905389 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -695,6 +695,9 @@ class AppLocalizationsEn extends AppLocalizations { @override String get loadingData => 'Loading data...'; + @override + String get loadingFullList => 'Loading full list...'; + @override String get createSource => 'Create Source'; diff --git a/lib/l10n/arb/app_ar.arb b/lib/l10n/arb/app_ar.arb index 95552bf..795602d 100644 --- a/lib/l10n/arb/app_ar.arb +++ b/lib/l10n/arb/app_ar.arb @@ -854,6 +854,10 @@ "@loadingData": { "description": "رسالة عامة تُعرض أثناء تحميل البيانات لنموذج" }, + "loadingFullList": "جاري تحميل القائمة الكاملة...", + "@loadingFullList": { + "description": "رسالة تُعرض في قائمة منسدلة عند تحميل قائمتها الكاملة من العناصر في الخلفية." + }, "createSource": "إنشاء مصدر", "@createSource": { "description": "عنوان صفحة إنشاء مصدر" @@ -1090,4 +1094,4 @@ "@countryPickerSelectCountryLabel": { "description": "التسمية المعروضة عند عدم اختيار أي دولة في حقل نموذج منتقي البلد" } -} \ No newline at end of file +} diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index 3192882..330be9d 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -854,6 +854,10 @@ "@loadingData": { "description": "Generic message displayed while loading data for a form" }, + "loadingFullList": "Loading full list...", + "@loadingFullList": { + "description": "Message displayed in a dropdown when its full list of items is being loaded in the background." + }, "createSource": "Create Source", "@createSource": { "description": "Title for the Create Source page"