@@ -65,18 +65,18 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
65
65
child: Text (
66
66
l10n.appConfigurationPageDescription,
67
67
style: Theme .of (context).textTheme.bodyMedium? .copyWith (
68
- color: Theme .of (context).colorScheme.onSurfaceVariant,
69
- ),
68
+ color: Theme .of (context).colorScheme.onSurfaceVariant,
69
+ ),
70
70
),
71
71
),
72
72
TabBar (
73
73
controller: _tabController,
74
74
tabAlignment: TabAlignment .start,
75
75
isScrollable: true ,
76
- tabs: const [
77
- Tab (text: 'Feed' ),
78
- Tab (text: 'Advertisements' ),
79
- Tab (text: 'General' ),
76
+ tabs: [
77
+ Tab (text: l10n.feedTab ),
78
+ Tab (text: l10n.advertisementsTab ),
79
+ Tab (text: l10n.generalTab ),
80
80
],
81
81
),
82
82
],
@@ -94,8 +94,8 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
94
94
content: Text (
95
95
l10n.appConfigSaveSuccessMessage,
96
96
style: Theme .of (context).textTheme.bodyMedium? .copyWith (
97
- color: Theme .of (context).colorScheme.onPrimary,
98
- ),
97
+ color: Theme .of (context).colorScheme.onPrimary,
98
+ ),
99
99
),
100
100
backgroundColor: Theme .of (context).colorScheme.primary,
101
101
),
@@ -113,8 +113,8 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
113
113
content: Text (
114
114
state.exception! .toFriendlyMessage (context),
115
115
style: Theme .of (context).textTheme.bodyMedium? .copyWith (
116
- color: Theme .of (context).colorScheme.onError,
117
- ),
116
+ color: Theme .of (context).colorScheme.onError,
117
+ ),
118
118
),
119
119
backgroundColor: Theme .of (context).colorScheme.error,
120
120
),
@@ -148,7 +148,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
148
148
padding: const EdgeInsets .all (AppSpacing .lg),
149
149
children: [
150
150
ExpansionTile (
151
- title: const Text ('User Content & Feed Limits' ),
151
+ title: Text (l10n.userContentLimitsTitle ),
152
152
childrenPadding: const EdgeInsets .symmetric (
153
153
horizontal: AppSpacing .xxl,
154
154
),
@@ -160,7 +160,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
160
160
],
161
161
),
162
162
ExpansionTile (
163
- title: const Text ('In-App Action Prompts' ),
163
+ title: Text (l10n.feedActionsTitle ),
164
164
childrenPadding: const EdgeInsets .symmetric (
165
165
horizontal: AppSpacing .xxl,
166
166
),
@@ -174,7 +174,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
174
174
padding: const EdgeInsets .all (AppSpacing .lg),
175
175
children: [
176
176
ExpansionTile (
177
- title: const Text ('Advertisement Settings' ),
177
+ title: Text (l10n.adSettingsTitle ),
178
178
childrenPadding: const EdgeInsets .symmetric (
179
179
horizontal: AppSpacing .xxl,
180
180
),
@@ -297,7 +297,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
297
297
crossAxisAlignment: CrossAxisAlignment .start,
298
298
children: [
299
299
Text (
300
- 'Set limits on followed items and saved headlines for each user tier.' ,
300
+ l10n.userContentLimitsDescription ,
301
301
style: Theme .of (context).textTheme.bodySmall? .copyWith (
302
302
color: Theme .of (context).colorScheme.onSurface.withOpacity (0.7 ),
303
303
),
@@ -376,7 +376,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
376
376
crossAxisAlignment: CrossAxisAlignment .start,
377
377
children: [
378
378
Text (
379
- 'Manage ad frequency and placement for different user roles.' ,
379
+ l10n.adSettingsDescription ,
380
380
style: Theme .of (context).textTheme.bodySmall? .copyWith (
381
381
color: Theme .of (context).colorScheme.onSurface.withOpacity (0.7 ),
382
382
),
@@ -455,7 +455,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
455
455
crossAxisAlignment: CrossAxisAlignment .start,
456
456
children: [
457
457
Text (
458
- 'Configure how often to show prompts for actions like rating the app.' ,
458
+ l10n.feedActionsDescription ,
459
459
style: Theme .of (context).textTheme.bodySmall? .copyWith (
460
460
color: Theme .of (context).colorScheme.onSurface.withOpacity (0.7 ),
461
461
),
@@ -511,7 +511,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
511
511
) {
512
512
final l10n = context.l10n;
513
513
return ExpansionTile (
514
- title: const Text ('Maintenance Mode' ),
514
+ title: Text (l10n.maintenanceModeTitle ),
515
515
childrenPadding: const EdgeInsets .symmetric (
516
516
horizontal: AppSpacing .xxl,
517
517
vertical: AppSpacing .md,
@@ -521,10 +521,11 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
521
521
crossAxisAlignment: CrossAxisAlignment .start,
522
522
children: [
523
523
Text (
524
- 'Enable to show a maintenance screen to all users.' ,
524
+ l10n.maintenanceModeDescription ,
525
525
style: Theme .of (context).textTheme.bodySmall? .copyWith (
526
- color: Theme .of (context).colorScheme.onSurface.withOpacity (0.7 ),
527
- ),
526
+ color:
527
+ Theme .of (context).colorScheme.onSurface.withOpacity (0.7 ),
528
+ ),
528
529
),
529
530
const SizedBox (height: AppSpacing .lg),
530
531
SwitchListTile (
@@ -533,14 +534,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
533
534
value: remoteConfig.appStatus.isUnderMaintenance,
534
535
onChanged: (value) {
535
536
context.read <AppConfigurationBloc >().add (
536
- AppConfigurationFieldChanged (
537
- remoteConfig: remoteConfig.copyWith (
538
- appStatus: remoteConfig.appStatus.copyWith (
539
- isUnderMaintenance: value,
537
+ AppConfigurationFieldChanged (
538
+ remoteConfig: remoteConfig.copyWith (
539
+ appStatus: remoteConfig.appStatus.copyWith (
540
+ isUnderMaintenance: value,
541
+ ),
542
+ ),
540
543
),
541
- ),
542
- ),
543
- );
544
+ );
544
545
},
545
546
),
546
547
],
@@ -555,7 +556,7 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
555
556
) {
556
557
final l10n = context.l10n;
557
558
return ExpansionTile (
558
- title: const Text ('Force App Update' ),
559
+ title: Text (l10n.forceUpdateTitle ),
559
560
childrenPadding: const EdgeInsets .symmetric (
560
561
horizontal: AppSpacing .xxl,
561
562
vertical: AppSpacing .md,
@@ -565,10 +566,11 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
565
566
crossAxisAlignment: CrossAxisAlignment .start,
566
567
children: [
567
568
Text (
568
- 'Configure mandatory app updates for users.' ,
569
+ l10n.forceUpdateDescription ,
569
570
style: Theme .of (context).textTheme.bodySmall? .copyWith (
570
- color: Theme .of (context).colorScheme.onSurface.withOpacity (0.7 ),
571
- ),
571
+ color:
572
+ Theme .of (context).colorScheme.onSurface.withOpacity (0.7 ),
573
+ ),
572
574
),
573
575
const SizedBox (height: AppSpacing .lg),
574
576
_buildTextField (
@@ -578,14 +580,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
578
580
value: remoteConfig.appStatus.latestAppVersion,
579
581
onChanged: (value) {
580
582
context.read <AppConfigurationBloc >().add (
581
- AppConfigurationFieldChanged (
582
- remoteConfig: remoteConfig.copyWith (
583
- appStatus: remoteConfig.appStatus.copyWith (
584
- latestAppVersion: value,
583
+ AppConfigurationFieldChanged (
584
+ remoteConfig: remoteConfig.copyWith (
585
+ appStatus: remoteConfig.appStatus.copyWith (
586
+ latestAppVersion: value,
587
+ ),
588
+ ),
585
589
),
586
- ),
587
- ),
588
- );
590
+ );
589
591
},
590
592
),
591
593
SwitchListTile (
@@ -594,14 +596,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
594
596
value: remoteConfig.appStatus.isLatestVersionOnly,
595
597
onChanged: (value) {
596
598
context.read <AppConfigurationBloc >().add (
597
- AppConfigurationFieldChanged (
598
- remoteConfig: remoteConfig.copyWith (
599
- appStatus: remoteConfig.appStatus.copyWith (
600
- isLatestVersionOnly: value,
599
+ AppConfigurationFieldChanged (
600
+ remoteConfig: remoteConfig.copyWith (
601
+ appStatus: remoteConfig.appStatus.copyWith (
602
+ isLatestVersionOnly: value,
603
+ ),
604
+ ),
601
605
),
602
- ),
603
- ),
604
- );
606
+ );
605
607
},
606
608
),
607
609
_buildTextField (
@@ -611,14 +613,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
611
613
value: remoteConfig.appStatus.iosUpdateUrl,
612
614
onChanged: (value) {
613
615
context.read <AppConfigurationBloc >().add (
614
- AppConfigurationFieldChanged (
615
- remoteConfig: remoteConfig.copyWith (
616
- appStatus: remoteConfig.appStatus.copyWith (
617
- iosUpdateUrl: value,
616
+ AppConfigurationFieldChanged (
617
+ remoteConfig: remoteConfig.copyWith (
618
+ appStatus: remoteConfig.appStatus.copyWith (
619
+ iosUpdateUrl: value,
620
+ ),
621
+ ),
618
622
),
619
- ),
620
- ),
621
- );
623
+ );
622
624
},
623
625
),
624
626
_buildTextField (
@@ -628,14 +630,14 @@ class _AppConfigurationPageState extends State<AppConfigurationPage>
628
630
value: remoteConfig.appStatus.androidUpdateUrl,
629
631
onChanged: (value) {
630
632
context.read <AppConfigurationBloc >().add (
631
- AppConfigurationFieldChanged (
632
- remoteConfig: remoteConfig.copyWith (
633
- appStatus: remoteConfig.appStatus.copyWith (
634
- androidUpdateUrl: value,
633
+ AppConfigurationFieldChanged (
634
+ remoteConfig: remoteConfig.copyWith (
635
+ appStatus: remoteConfig.appStatus.copyWith (
636
+ androidUpdateUrl: value,
637
+ ),
638
+ ),
635
639
),
636
- ),
637
- ),
638
- );
640
+ );
639
641
},
640
642
),
641
643
],
@@ -1329,7 +1331,9 @@ class _AccountActionConfigFormState extends State<_AccountActionConfigForm> {
1329
1331
),
1330
1332
value: _getDaysMap (accountActionConfig)[actionType] ?? 0 ,
1331
1333
onChanged: (value) {
1332
- final currentMap = _getDaysMap (accountActionConfig);
1334
+ final currentMap = Map <FeedActionType , int >.from (
1335
+ _getDaysMap (accountActionConfig),
1336
+ );
1333
1337
final updatedMap = Map <FeedActionType , int >.from (currentMap)
1334
1338
..[actionType] = value;
1335
1339
0 commit comments