|
1 | 1 | import 'package:core/core.dart'; |
2 | 2 | import 'package:flutter/material.dart'; |
3 | 3 | import 'package:flutter_news_app_web_dashboard_full_source_code/app_configuration/widgets/app_config_form_fields.dart'; |
4 | | -import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/app_localizations.dart'; |
5 | 4 | import 'package:flutter_news_app_web_dashboard_full_source_code/l10n/l10n.dart'; |
6 | 5 | import 'package:ui_kit/ui_kit.dart'; |
7 | 6 |
|
@@ -57,8 +56,9 @@ class _AppReviewSettingsFormState extends State<AppReviewSettingsForm> { |
57 | 56 |
|
58 | 57 | void _updateControllers() { |
59 | 58 | final appReviewConfig = widget.remoteConfig.features.community.appReview; |
60 | | - _interactionCycleThresholdController.text = |
61 | | - appReviewConfig.interactionCycleThreshold.toString(); |
| 59 | + _interactionCycleThresholdController.text = appReviewConfig |
| 60 | + .interactionCycleThreshold |
| 61 | + .toString(); |
62 | 62 | _initialPromptCooldownController.text = appReviewConfig |
63 | 63 | .initialPromptCooldownDays |
64 | 64 | .toString(); |
@@ -192,26 +192,28 @@ class _AppReviewSettingsFormState extends State<AppReviewSettingsForm> { |
192 | 192 | .eligiblePositiveInteractions |
193 | 193 | .contains(interactionType), |
194 | 194 | onChanged: (value) { |
195 | | - final currentInteractions = List< |
196 | | - PositiveInteractionType>.from( |
197 | | - appReviewConfig.eligiblePositiveInteractions, |
198 | | - ); |
| 195 | + final currentInteractions = |
| 196 | + List<PositiveInteractionType>.from( |
| 197 | + appReviewConfig |
| 198 | + .eligiblePositiveInteractions, |
| 199 | + ); |
199 | 200 | if (value) { |
200 | 201 | currentInteractions.add(interactionType); |
201 | 202 | } else { |
202 | 203 | currentInteractions.remove(interactionType); |
203 | 204 | } |
204 | | - final newAppReviewConfig = |
205 | | - appReviewConfig.copyWith( |
206 | | - eligiblePositiveInteractions: |
207 | | - currentInteractions, |
208 | | - ); |
| 205 | + final newAppReviewConfig = appReviewConfig |
| 206 | + .copyWith( |
| 207 | + eligiblePositiveInteractions: |
| 208 | + currentInteractions, |
| 209 | + ); |
209 | 210 | widget.onConfigChanged( |
210 | 211 | widget.remoteConfig.copyWith( |
211 | 212 | features: widget.remoteConfig.features |
212 | 213 | .copyWith( |
213 | 214 | community: communityConfig.copyWith( |
214 | | - appReview: newAppReviewConfig), |
| 215 | + appReview: newAppReviewConfig, |
| 216 | + ), |
215 | 217 | ), |
216 | 218 | ), |
217 | 219 | ); |
|
0 commit comments