78 lines
3.0 KiB
Dart
78 lines
3.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'security_settings_screen.dart';
|
|
import 'privacy_settings_screen.dart';
|
|
|
|
class PrivacySettingsMenuScreen extends StatelessWidget {
|
|
const PrivacySettingsMenuScreen({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colorScheme = Theme.of(context).colorScheme;
|
|
|
|
return Scaffold(
|
|
backgroundColor: colorScheme.background,
|
|
appBar: AppBar(
|
|
title: const Text('Конфиденциальность', style: TextStyle(fontWeight: FontWeight.bold)),
|
|
elevation: 0,
|
|
backgroundColor: Colors.transparent,
|
|
),
|
|
body: ListView(
|
|
physics: const BouncingScrollPhysics(),
|
|
padding: const EdgeInsets.all(16),
|
|
children: [
|
|
Container(
|
|
decoration: BoxDecoration(
|
|
color: colorScheme.surfaceVariant.withOpacity(0.2),
|
|
borderRadius: BorderRadius.circular(24),
|
|
border: Border.all(color: colorScheme.outlineVariant.withOpacity(0.1)),
|
|
),
|
|
child: Column(
|
|
children: [
|
|
_buildMenuTile(
|
|
context: context,
|
|
icon: Icons.security_rounded,
|
|
title: 'Безопасность',
|
|
subtitle: 'Смена паролей, ключи шифрования, TOTP защита',
|
|
onTap: () => Navigator.push(context, MaterialPageRoute(builder: (_) => const SecuritySettingsScreen())),
|
|
),
|
|
Divider(height: 1, indent: 68, color: colorScheme.outlineVariant.withOpacity(0.2)),
|
|
_buildMenuTile(
|
|
context: context,
|
|
icon: Icons.privacy_tip_rounded,
|
|
title: 'Конфиденциальность',
|
|
subtitle: 'Видимость почты, телефона, аватара и онлайна',
|
|
onTap: () => Navigator.push(context, MaterialPageRoute(builder: (_) => const PrivacySettingsScreen())),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
|
|
Widget _buildMenuTile({
|
|
required BuildContext context,
|
|
required IconData icon,
|
|
required String title,
|
|
required String subtitle,
|
|
required VoidCallback onTap,
|
|
}) {
|
|
final colorScheme = Theme.of(context).colorScheme;
|
|
return ListTile(
|
|
contentPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 8),
|
|
leading: Container(
|
|
padding: const EdgeInsets.all(8),
|
|
decoration: BoxDecoration(
|
|
color: colorScheme.primary.withOpacity(0.08),
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
child: Icon(icon, color: colorScheme.primary, size: 22),
|
|
),
|
|
title: Text(title, style: const TextStyle(fontWeight: FontWeight.w600, fontSize: 16)),
|
|
subtitle: Text(subtitle, style: TextStyle(color: colorScheme.outline, fontSize: 12)),
|
|
trailing: Icon(Icons.chevron_right_rounded, color: colorScheme.outline),
|
|
onTap: onTap,
|
|
);
|
|
}
|
|
} |