Skip to content

Commit f889261

Browse files
committed
feat(app_configuration): add switch for source reporting
- Add SwitchListTile to enable/disable source reporting - Update reporting configuration when switch state changes - Implement source reporting
1 parent 7588290 commit f889261

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/app_configuration/widgets/reporting_settings_form.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,24 @@ class ReportingSettingsForm extends StatelessWidget {
6767
);
6868
},
6969
),
70+
SwitchListTile(
71+
title: Text(l10n.enableSourceReportingLabel),
72+
value: reportingConfig.sourceReportingEnabled,
73+
onChanged: (value) {
74+
final newConfig = reportingConfig.copyWith(
75+
sourceReportingEnabled: value,
76+
);
77+
onConfigChanged(
78+
remoteConfig.copyWith(
79+
features: remoteConfig.features.copyWith(
80+
community: communityConfig.copyWith(
81+
reporting: newConfig,
82+
),
83+
),
84+
),
85+
);
86+
},
87+
),
7088
SwitchListTile(
7189
title: Text(l10n.enableCommentReportingLabel),
7290
value: reportingConfig.commentReportingEnabled,

0 commit comments

Comments
 (0)