setting to enable screenshot protection

This commit is contained in:
Fabian Freund
2026-05-01 05:18:32 +02:00
parent e7ccd1cf89
commit 0f011351ff
14 changed files with 2347 additions and 3193 deletions
@@ -144,6 +144,7 @@ class _PrivacySignalsSection extends StatelessWidget {
children: [
SettingSection(name: 'Privacy Signals & Modes'),
_IncognitoModeSection(),
_ScreenshotProtectionTile(),
_GlobalPrivacyControlTile(),
],
);
@@ -452,6 +453,36 @@ class _GlobalPrivacyControlTile extends HookConsumerWidget {
}
}
class _ScreenshotProtectionTile extends HookConsumerWidget {
const _ScreenshotProtectionTile();
@override
Widget build(BuildContext context, WidgetRef ref) {
final enabled = ref.watch(
generalSettingsWithDefaultsProvider.select(
(s) => s.screenshotProtectionEnabled,
),
);
return SwitchListTile.adaptive(
title: const Text('Screenshot protection'),
subtitle: const Text(
'Blocks screenshots and screen recordings for this app on Android.',
),
secondary: const Icon(MdiIcons.cameraOff),
value: enabled,
onChanged: (value) async {
await ref
.read(saveGeneralSettingsControllerProvider.notifier)
.save(
(currentSettings) => currentSettings.copyWith
.screenshotProtectionEnabled(value),
);
},
);
}
}
class _HttpsOnlyModeSection extends HookConsumerWidget {
const _HttpsOnlyModeSection();