@@ -4,6 +4,8 @@ import 'package:flutter_bloc/flutter_bloc.dart';
4
4
import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/bloc/app_configuration_bloc.dart' ;
5
5
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/app_localizations.dart' ;
6
6
import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart' ;
7
+ import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/app_user_role_l10n.dart' ;
8
+ import 'package:flutter_news_app_web_dashboard_full_source_code/shared/extensions/feed_decorator_type_l10n.dart' ;
7
9
import 'package:ui_kit/ui_kit.dart' ;
8
10
9
11
/// {@template app_configuration_page}
@@ -366,8 +368,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
366
368
RemoteConfig remoteConfig,
367
369
) {
368
370
final l10n = AppLocalizationsX (context).l10n;
369
- final decoratorConfigs = remoteConfig.feedDecoratorConfig.entries.toList ();
370
-
371
+
371
372
return Column (
372
373
crossAxisAlignment: CrossAxisAlignment .start,
373
374
children: [
@@ -378,17 +379,17 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
378
379
),
379
380
),
380
381
const SizedBox (height: AppSpacing .lg),
381
- for (final decoratorEntry in decoratorConfigs )
382
+ for (final decoratorType in FeedDecoratorType .values )
382
383
ExpansionTile (
383
384
title: Text (
384
- decoratorEntry.key.name. toUpperCase ( ),
385
+ decoratorType. l10n (context ),
385
386
),
386
387
childrenPadding: const EdgeInsets .symmetric (
387
388
horizontal: AppSpacing .xxl,
388
389
),
389
390
children: [
390
391
_FeedDecoratorForm (
391
- decoratorType: decoratorEntry.key ,
392
+ decoratorType: decoratorType ,
392
393
remoteConfig: remoteConfig,
393
394
onConfigChanged: (newConfig) {
394
395
context.read <AppConfigurationBloc >().add (
@@ -1068,7 +1069,7 @@ class _FeedDecoratorFormState extends State<_FeedDecoratorForm> {
1068
1069
return Column (
1069
1070
children: [
1070
1071
CheckboxListTile (
1071
- title: Text (role.name), // Will be localized later
1072
+ title: Text (role.l10n (context)),
1072
1073
value: roleConfig != null ,
1073
1074
onChanged: (value) {
1074
1075
final newVisibleTo =
0 commit comments