@@ -54,8 +54,8 @@ class _ArticleAdSettingsFormState extends State<ArticleAdSettingsForm>
5454 widget.remoteConfig.copyWith (
5555 adConfig: adConfig.copyWith (
5656 articleAdConfiguration: articleAdConfig.copyWith (
57- enabled: value,
58- ),
57+ enabled: value,
58+ ),
5959 ),
6060 ),
6161 );
@@ -76,8 +76,8 @@ class _ArticleAdSettingsFormState extends State<ArticleAdSettingsForm>
7676 l10n.defaultInArticleAdTypeSelectionDescription,
7777 style: Theme .of (context).textTheme.bodySmall? .copyWith (
7878 color: Theme .of (
79- context,
80- ).colorScheme.onSurface.withOpacity (0.7 ),
79+ context,
80+ ).colorScheme.onSurface.withOpacity (0.7 ),
8181 ),
8282 textAlign: TextAlign .start, // Ensure text aligns to start
8383 ),
@@ -107,8 +107,8 @@ class _ArticleAdSettingsFormState extends State<ArticleAdSettingsForm>
107107 widget.remoteConfig.copyWith (
108108 adConfig: adConfig.copyWith (
109109 articleAdConfiguration: articleAdConfig.copyWith (
110- defaultInArticleAdType: newSelection.first,
111- ),
110+ defaultInArticleAdType: newSelection.first,
111+ ),
112112 ),
113113 ),
114114 );
@@ -132,37 +132,37 @@ class _ArticleAdSettingsFormState extends State<ArticleAdSettingsForm>
132132 l10n.inArticleAdSlotPlacementsDescription,
133133 style: Theme .of (context).textTheme.bodySmall? .copyWith (
134134 color: Theme .of (
135- context,
136- ).colorScheme.onSurface.withOpacity (0.7 ),
135+ context,
136+ ).colorScheme.onSurface.withOpacity (0.7 ),
137137 ),
138138 textAlign: TextAlign .start, // Ensure text aligns to start
139139 ),
140140 const SizedBox (height: AppSpacing .lg),
141141 ...articleAdConfig.inArticleAdSlotConfigurations.map (
142- (slotConfig) => SwitchListTile (
143- title: Text (slotConfig.slotType.l10n (context)),
144- value: slotConfig.enabled,
145- onChanged: (value) {
146- final updatedSlots = articleAdConfig
147- .inArticleAdSlotConfigurations
148- .map (
149- (e) => e.slotType == slotConfig.slotType
150- ? e.copyWith (enabled: value)
151- : e,
152- )
153- .toList ();
154- widget.onConfigChanged (
155- widget.remoteConfig.copyWith (
156- adConfig: adConfig.copyWith (
157- articleAdConfiguration: articleAdConfig.copyWith (
158- inArticleAdSlotConfigurations: updatedSlots,
159- ),
160- ),
142+ (slotConfig) => SwitchListTile (
143+ title: Text (slotConfig.slotType.l10n (context)),
144+ value: slotConfig.enabled,
145+ onChanged: (value) {
146+ final updatedSlots = articleAdConfig
147+ .inArticleAdSlotConfigurations
148+ .map (
149+ (e) => e.slotType == slotConfig.slotType
150+ ? e.copyWith (enabled: value)
151+ : e,
152+ )
153+ .toList ();
154+ widget.onConfigChanged (
155+ widget.remoteConfig.copyWith (
156+ adConfig: adConfig.copyWith (
157+ articleAdConfiguration: articleAdConfig.copyWith (
158+ inArticleAdSlotConfigurations: updatedSlots,
161159 ),
162- );
163- },
164- ),
165- ),
160+ ),
161+ ),
162+ );
163+ },
164+ ),
165+ ),
166166 ],
167167 ),
168168 ],
0 commit comments